From 9b83d661324477c580489de7269dd5673103d74d Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Mon, 9 Jan 2012 15:45:21 -0800 Subject: [PATCH] Use ArrayList instead of Vector. --- .../parser/tests/rewrite/RewriteBaseTest.java | 6 +- .../parser/tests/rewrite/RewriteTester.java | 18 +-- .../comenthandler/CommentHandlingTest.java | 3 +- .../org/eclipse/cdt/core/testplugin/Main.java | 14 +-- .../eclipse/cdt/core/testplugin/NewMain.java | 12 +- .../rewrite/commenthandler/NodeCommenter.java | 7 +- .../ExtractFunctionRefactoring.java | 103 +++++++++--------- .../extractfunction/SimilarFinderVisitor.java | 5 +- 8 files changed, 79 insertions(+), 89 deletions(-) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteBaseTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteBaseTest.java index 150d0307a45..70363a4f9a8 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteBaseTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteBaseTest.java @@ -13,9 +13,9 @@ package org.eclipse.cdt.core.parser.tests.rewrite; import java.io.BufferedReader; import java.io.InputStreamReader; +import java.util.List; import java.util.Map; import java.util.TreeMap; -import java.util.Vector; import org.eclipse.cdt.core.tests.BaseTestFramework; import org.eclipse.core.resources.IFile; @@ -38,8 +38,8 @@ public abstract class RewriteBaseTest extends BaseTestFramework implements ILogL protected RewriteBaseTest(String name) { super(name); } - - public RewriteBaseTest(String name, Vector files) { + + public RewriteBaseTest(String name, List files) { super(name); for (TestSourceFile file : files) { fileMap.put(file.getName(), file); diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java index a3a3d20a8a4..7fd51237662 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java @@ -18,7 +18,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Iterator; -import java.util.Vector; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -59,7 +59,7 @@ public class RewriteTester extends TestSuite { private static ArrayList createTests(BufferedReader inputReader) throws Exception { String line; - Vector files = new Vector(); + List files = new ArrayList(); TestSourceFile actFile = null; MatcherState matcherState = MatcherState.skip; ArrayList testCases = new ArrayList(); @@ -72,7 +72,7 @@ public class RewriteTester extends TestSuite { if (!bevorFirstTest) { RewriteBaseTest test = createTestClass(className, testName, files); testCases.add(test); - files = new Vector(); + files = new ArrayList(); className = null; testName = null; } @@ -114,17 +114,11 @@ public class RewriteTester extends TestSuite { } private static RewriteBaseTest createTestClass(String className, String testName, - Vector files) throws Exception { + List files) throws Exception { try { Class refClass = Class.forName(className); - Class paratypes[] = new Class[2]; - paratypes[0] = testName.getClass(); - paratypes[1] = files.getClass(); - Constructor ct = refClass.getConstructor(paratypes); - Object arglist[] = new Object[2]; - arglist[0] = testName; - arglist[1] = files; - RewriteBaseTest test = (RewriteBaseTest) ct.newInstance(arglist); + Constructor ct = refClass.getConstructor(new Class[] { String.class, List.class }); + RewriteBaseTest test = (RewriteBaseTest) ct.newInstance(new Object[] { testName, files }); for (TestSourceFile file : files) { TextSelection sel = file.getSelection(); if (sel != null) { diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java index 41eae83f14e..cda751ea9f3 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java @@ -15,7 +15,6 @@ import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.TreeSet; -import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -85,7 +84,7 @@ public class CommentHandlingTest extends RewriteBaseTest { private static final String TRAILING_COMMENT_TITLE = "<<<=== Trailing Comment Test Section ===>>>"; //$NON-NLS-1$ private static final String FREESTANDING_COMMENT_TITLE = "<<<=== Freestanding Comment Test Section ===>>>"; //$NON-NLS-1$ - public CommentHandlingTest(String name, Vector files) { + public CommentHandlingTest(String name, List files) { super(name, files); } diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java index 2c8057143e2..588257516eb 100644 --- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java +++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java @@ -22,8 +22,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; +import java.util.List; import java.util.StringTokenizer; -import java.util.Vector; /** * Startup class for Eclipse. Creates a class loader using * supplied URL of platform installation, loads and calls @@ -181,14 +181,14 @@ protected Object basicRun(String[] args) throws Exception { private String[] getArrayFromList(String prop) { if (prop == null || prop.trim().equals("")) return new String[0]; - Vector list = new Vector(); + List list = new ArrayList(); StringTokenizer tokens = new StringTokenizer(prop, ","); while (tokens.hasMoreTokens()) { String token = tokens.nextToken().trim(); if (!token.equals("")) - list.addElement(token); + list.add(token); } - return list.isEmpty() ? new String[0] : (String[]) list.toArray(new String[0]); + return list.toArray(new String[list.size()]); } /** * Creates and returns a platform BootLoader which can be used to start @@ -404,10 +404,10 @@ public static void endSplash() { * @exception Exception thrown if a problem occurs during launching */ public static void main(String argString) throws Exception { - Vector list = new Vector(5); + List list = new ArrayList(5); for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();) - list.addElement(tokens.nextElement()); - main((String[]) list.toArray(new String[list.size()])); + list.add((String) tokens.nextElement()); + main(list.toArray(new String[list.size()])); } /** diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java index f570c06b5d1..de29162a058 100644 --- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java +++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java @@ -14,18 +14,17 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URL; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; import java.util.StringTokenizer; -import java.util.Vector; /** * Application is responsible for calling core launch api */ - public class NewMain extends Main { private static final String DEFAULT_APPLICATION= "org.eclipse.ui.workbench"; - public NewMain(String application, String location, URL pluginPathLocation, String bootLocation, boolean debug) throws IOException { this.application= application; this.location= location; @@ -44,17 +43,16 @@ public class NewMain extends Main { System.exit(0); } - /** * Run this launcher with the arguments specified in the given string. * This is a short cut method for people running the launcher from * a scrapbook (i.e., swip-and-doit facility). */ public static void main(String argString) throws Exception { - Vector list= new Vector(5); + List list= new ArrayList(5); for (StringTokenizer tokens= new StringTokenizer(argString, " "); tokens.hasMoreElements();) - list.addElement(tokens.nextElement()); - main((String[]) list.toArray(new String[list.size()])); + list.add((String) tokens.nextElement()); + main(list.toArray(new String[list.size()])); } public static String getLocationFromProperties(String key) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java index 8938c60ff23..ec0d9f9afc8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java @@ -12,7 +12,8 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.rewrite.commenthandler; -import java.util.Vector; +import java.util.ArrayList; +import java.util.List; import org.eclipse.cdt.core.dom.ast.ASTVisitor; import org.eclipse.cdt.core.dom.ast.IASTComment; @@ -63,13 +64,13 @@ public class NodeCommenter { protected ASTVisitor visitor; protected CommentHandler commHandler; protected NodeCommentMap commentMap; - protected Vector children; + protected List children; public NodeCommenter(ASTVisitor visitor, CommentHandler commHandler, NodeCommentMap commentMap) { this.visitor = visitor; this.commHandler = commHandler; this.commentMap = commentMap; - this.children = new Vector(); + this.children = new ArrayList(); } protected void writeNodeList(IASTNode[] nodes) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java index 74e5a965a32..6fa612a08b8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java @@ -17,7 +17,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Vector; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.ResourcesPlugin; @@ -434,7 +433,7 @@ public class ExtractFunctionRefactoring extends CRefactoring { } } - final Vector initTrail = getTrail(nodesToRewriteWithoutComments); + final List initTrail = getTrail(nodesToRewriteWithoutComments); final String title; if (contextType == MethodContext.ContextType.METHOD) { title = Messages.ExtractFunctionRefactoring_CreateMethodCall; @@ -448,8 +447,8 @@ public class ExtractFunctionRefactoring extends CRefactoring { } } - protected Vector getTrail(List stmts) { - final Vector trail = new Vector(); + protected List getTrail(List stmts) { + final List trail = new ArrayList(); nameTrail = new HashMap(); final Container trailCounter = new Container(NULL_INTEGER); @@ -465,8 +464,9 @@ public class ExtractFunctionRefactoring extends CRefactoring { trail.add(node); return PROCESS_SKIP; } else if (node instanceof IASTName) { - if (node instanceof ICPPASTConversionName && node instanceof ICPPASTOperatorName - && node instanceof ICPPASTTemplateId) { + if (node instanceof ICPPASTConversionName && + node instanceof ICPPASTOperatorName && + node instanceof ICPPASTTemplateId) { trail.add(node); return super.visitAll(node); } else { @@ -483,8 +483,8 @@ public class ExtractFunctionRefactoring extends CRefactoring { } trailName.setNameNumber(actCount); - if (info.getReturnVariable() != null - && info.getReturnVariable().getName().getRawSignature().equals( + if (info.getReturnVariable() != null && + info.getReturnVariable().getName().getRawSignature().equals( name.getRawSignature())) { returnNumber.setObject(Integer.valueOf(actCount)); } @@ -498,13 +498,12 @@ public class ExtractFunctionRefactoring extends CRefactoring { } } }); - } return trail; } - protected boolean isStatementInTrail(IASTStatement stmt, final Vector trail, IIndex index) { + protected boolean isStatementInTrail(IASTStatement stmt, final List trail, IIndex index) { final Container same = new Container(Boolean.TRUE); final TrailNodeEqualityChecker equalityChecker = new TrailNodeEqualityChecker(names, namesCounter, index); @@ -591,8 +590,8 @@ public class ExtractFunctionRefactoring extends CRefactoring { return true; } - private void addMethod(IASTName astMethodName, MethodContext context, - ASTRewrite rewriter, IASTNode insertpoint, TextEditGroup group) { + private void addMethod(IASTName astMethodName, MethodContext context, ASTRewrite rewriter, + IASTNode insertpoint, TextEditGroup group) { ICPPASTQualifiedName qname = new CPPASTQualifiedName(); if (context.getType() == ContextType.METHOD) { if (context.getMethodQName() != null) { @@ -609,10 +608,10 @@ public class ExtractFunctionRefactoring extends CRefactoring { IASTDeclSpecifier returnType = getReturnType(); func.setDeclSpecifier(returnType); - IASTStandardFunctionDeclarator createdFunctionDeclarator = extractedFunctionConstructionHelper - .createFunctionDeclarator(qname, info.getDeclarator(), info - .getReturnVariable(), container.getNodesToWrite(), info - .getAllUsedNames(), ast.getASTNodeFactory()); + IASTStandardFunctionDeclarator createdFunctionDeclarator = + extractedFunctionConstructionHelper.createFunctionDeclarator(qname, + info.getDeclarator(), info.getReturnVariable(), container.getNodesToWrite(), + info.getAllUsedNames(), ast.getASTNodeFactory()); func.setDeclarator(createdFunctionDeclarator); IASTCompoundStatement compound = new CPPASTCompoundStatement(); @@ -623,8 +622,8 @@ public class ExtractFunctionRefactoring extends CRefactoring { CPPASTTemplateDeclaration templateDeclaration = new CPPASTTemplateDeclaration(); templateDeclaration.setParent(ast); - for (ICPPASTTemplateParameter templateParameter : ((ICPPASTTemplateDeclaration) insertpoint.getParent()).getTemplateParameters()) { - templateDeclaration.addTemplateParameter(templateParameter.copy(CopyStyle.withLocations)); + for (ICPPASTTemplateParameter param : ((ICPPASTTemplateDeclaration) insertpoint.getParent()).getTemplateParameters()) { + templateDeclaration.addTemplateParameter(param.copy(CopyStyle.withLocations)); } templateDeclaration.setDeclaration(func); @@ -664,8 +663,8 @@ public class ExtractFunctionRefactoring extends CRefactoring { private IASTDeclSpecifier getReturnType() { IASTNode firstNodeToWrite = container.getNodesToWrite().get(0); NameInformation returnVariable = info.getReturnVariable(); - - return extractedFunctionConstructionHelper.determineReturnType(firstNodeToWrite, returnVariable); + return extractedFunctionConstructionHelper.determineReturnType(firstNodeToWrite, + returnVariable); } protected IASTNode getMethodCall(IASTName astMethodName, @@ -678,30 +677,28 @@ public class ExtractFunctionRefactoring extends CRefactoring { idExpression.setName(astMethodName); List args = new ArrayList(); - Vector declarations = new Vector(); + List declarations = new ArrayList(); IASTName retName = null; boolean theRetName = false; for (NameInformation nameInfo : myContainer.getNames()) { Integer trailSeqNumber = trailNameTable.get(nameInfo.getDeclaration().getRawSignature()); - String orgName = null; + String origName = null; for (Entry entry : similarNameTable.entrySet()) { if (entry.getValue().equals(trailSeqNumber)) { - orgName = entry.getKey(); - if (info.getReturnVariable() != null - && trailSeqNumber.equals(returnNumber.getObject())) { + origName = entry.getKey(); + if (info.getReturnVariable() != null && + trailSeqNumber.equals(returnNumber.getObject())) { theRetName = true; } } } - if (orgName != null) { + if (origName != null) { boolean found = false; for (NameInformation simNameInfo : mySimilarContainer.getNames()) { - if (orgName.equals(simNameInfo.getDeclaration() - .getRawSignature())) { - addAParameterIfPossible(args, declarations, - simNameInfo); + if (origName.equals(simNameInfo.getDeclaration().getRawSignature())) { + addParameterIfPossible(args, declarations, simNameInfo); found = true; if (theRetName) { @@ -715,7 +712,7 @@ public class ExtractFunctionRefactoring extends CRefactoring { if (!found) { // should be a field, use the old name IASTIdExpression expression = new CPPASTIdExpression(); - CPPASTName fieldName = new CPPASTName(orgName.toCharArray()); + CPPASTName fieldName = new CPPASTName(origName.toCharArray()); expression.setName(fieldName); args.add(expression); @@ -763,7 +760,6 @@ public class ExtractFunctionRefactoring extends CRefactoring { decl.setDeclSpecifier(orgDecl.getDeclSpecifier().copy(CopyStyle.withLocations)); IASTDeclarator declarator = new CPPASTDeclarator(); - declarator.setName(retname); for (IASTPointerOperator pointer : orgDecl.getDeclarators()[0].getPointerOperators()) { @@ -792,31 +788,30 @@ public class ExtractFunctionRefactoring extends CRefactoring { private IASTNode getReturnAssignment(IASTExpressionStatement stmt, IASTExpression callExpression) { IASTNode node = container.getNodesToWrite().get(0); - return extractedFunctionConstructionHelper.createReturnAssignment(node, - stmt, callExpression); + return extractedFunctionConstructionHelper.createReturnAssignment(node, stmt, callExpression); } private IASTSimpleDeclaration getDeclaration(IASTName name) { IASTSimpleDeclaration simpleDecl = new CPPASTSimpleDeclaration(); IASTStandardFunctionDeclarator declarator = extractedFunctionConstructionHelper.createFunctionDeclarator(name, - info.getDeclarator(), info.getReturnVariable(), - container.getNodesToWrite(), info.getAllUsedNames(), ast.getASTNodeFactory()); + info.getDeclarator(), info.getReturnVariable(), container.getNodesToWrite(), + info.getAllUsedNames(), ast.getASTNodeFactory()); simpleDecl.addDeclarator(declarator); return simpleDecl; } - private IASTSimpleDeclaration getDeclaration(ModificationCollector collector,IASTName name) { + private IASTSimpleDeclaration getDeclaration(ModificationCollector collector, IASTName name) { IASTDeclSpecifier declSpec = getReturnType(); IASTSimpleDeclaration simpleDecl = factory.newSimpleDeclaration(declSpec); if (info.isVirtual() && declSpec instanceof ICPPASTDeclSpecifier) { - ((ICPPASTDeclSpecifier)declSpec).setVirtual(true); + ((ICPPASTDeclSpecifier) declSpec).setVirtual(true); } simpleDecl.setParent(ast); - IASTStandardFunctionDeclarator declarator = extractedFunctionConstructionHelper - .createFunctionDeclarator(name, info.getDeclarator(), info - .getReturnVariable(), container.getNodesToWrite(), info - .getAllUsedNames(), ast.getASTNodeFactory()); + IASTStandardFunctionDeclarator declarator = + extractedFunctionConstructionHelper.createFunctionDeclarator(name, + info.getDeclarator(), info.getReturnVariable(), container.getNodesToWrite(), + info.getAllUsedNames(), ast.getASTNodeFactory()); simpleDecl.addDeclarator(declarator); return simpleDecl; } @@ -852,17 +847,17 @@ public class ExtractFunctionRefactoring extends CRefactoring { public List getCallParameters() { List args = new ArrayList(); - Vector declarations = new Vector(); - for (NameInformation nameInf : container.getNames()) { - addAParameterIfPossible(args, declarations, nameInf); + List declarations = new ArrayList(); + for (NameInformation nameInfo : container.getNames()) { + addParameterIfPossible(args, declarations, nameInfo); } return args; } - private void addAParameterIfPossible(List args, - Vector declarations, NameInformation nameInf) { - if (!nameInf.isDeclarationInScope()) { - IASTName declaration = nameInf.getDeclaration(); + private void addParameterIfPossible(List args, + List declarations, NameInformation nameInfо) { + if (!nameInfо.isDeclarationInScope()) { + IASTName declaration = nameInfо.getDeclaration(); if (!declarations.contains(declaration)) { declarations.add(declaration); IASTIdExpression expression = new CPPASTIdExpression(); @@ -875,7 +870,9 @@ public class ExtractFunctionRefactoring extends CRefactoring { @Override protected RefactoringDescriptor getRefactoringDescriptor() { Map arguments = getArgumentMap(); - RefactoringDescriptor desc = new ExtractFunctionRefactoringDescription(project.getProject().getName(), "Extract Method Refactoring", "Create method " + info.getMethodName(), arguments); //$NON-NLS-1$//$NON-NLS-2$ + RefactoringDescriptor desc = + new ExtractFunctionRefactoringDescription(project.getProject().getName(), + "Extract Method Refactoring", "Create method " + info.getMethodName(), arguments); //$NON-NLS-1$//$NON-NLS-2$ return desc; } @@ -884,8 +881,10 @@ public class ExtractFunctionRefactoring extends CRefactoring { arguments.put(CRefactoringDescription.FILE_NAME, file.getLocationURI().toString()); arguments.put(CRefactoringDescription.SELECTION, region.getOffset() + "," + region.getLength()); //$NON-NLS-1$ arguments.put(ExtractFunctionRefactoringDescription.NAME, info.getMethodName()); - arguments.put(ExtractFunctionRefactoringDescription.VISIBILITY, info.getVisibility().toString()); - arguments.put(ExtractFunctionRefactoringDescription.REPLACE_DUPLICATES, Boolean.toString(info.isReplaceDuplicates())); + arguments.put(ExtractFunctionRefactoringDescription.VISIBILITY, + info.getVisibility().toString()); + arguments.put(ExtractFunctionRefactoringDescription.REPLACE_DUPLICATES, + Boolean.toString(info.isReplaceDuplicates())); return arguments; } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/SimilarFinderVisitor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/SimilarFinderVisitor.java index 4a557f11653..594fef8a01b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/SimilarFinderVisitor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/SimilarFinderVisitor.java @@ -14,7 +14,6 @@ package org.eclipse.cdt.internal.ui.refactoring.extractfunction; import java.util.ArrayList; import java.util.List; import java.util.Map.Entry; -import java.util.Vector; import org.eclipse.core.resources.IFile; import org.eclipse.text.edits.TextEditGroup; @@ -32,7 +31,7 @@ import org.eclipse.cdt.internal.ui.refactoring.NodeContainer.NameInformation; final class SimilarFinderVisitor extends ASTVisitor { private final ExtractFunctionRefactoring refactoring; - private final Vector trail; + private final List trail; private final IASTName name; private final List statements; private int statementCount; @@ -42,7 +41,7 @@ final class SimilarFinderVisitor extends ASTVisitor { private final ModificationCollector collector; SimilarFinderVisitor(ExtractFunctionRefactoring refactoring, ModificationCollector collector, - Vector trail, IFile file, IASTName name, List statements, + List trail, IFile file, IASTName name, List statements, String title) { this.refactoring = refactoring; this.trail = trail;