ITypeBinding typeBinding2 = sourceTypeDeclarations.get(1).resolveBinding();
commonSuperTypeOfSourceTypeDeclarations = ASTNodeMatcher.commonSuperType(typeBinding1, typeBinding2);
if(commonSuperTypeOfSourceTypeDeclarations != null) {
if(mapper.getCloneRefactoringType().equals(CloneRefactoringType.PULL_UP_TO_EXISTING_SUPERCLASS)) {
IJavaElement javaElement = commonSuperTypeOfSourceTypeDeclarations.getJavaElement();
<BUG>javaElementsToOpenInEditor.add(javaElement);
ICompilationUnit iCompilationUnit = (ICompilationUnit)javaElement.getParent();
</BUG>
ASTParser parser = ASTParser.newParser(ASTReader.JLS);
parser.setKind(ASTParser.K_COMPILATION_UNIT);

ITypeBinding typeBinding2 = sourceTypeDeclarations.get(1).resolveBinding();
commonSuperTypeOfSourceTypeDeclarations = ASTNodeMatcher.commonSuperType(typeBinding1, typeBinding2);
if(commonSuperTypeOfSourceTypeDeclarations != null) {
if(mapper.getCloneRefactoringType().equals(CloneRefactoringType.PULL_UP_TO_EXISTING_SUPERCLASS)) {
IJavaElement javaElement = commonSuperTypeOfSourceTypeDeclarations.getJavaElement();
javaElementsToOpenInEditor.add(javaElement);
IJavaElement parent = javaElement.getParent();
while(!(parent instanceof ICompilationUnit)) {
parent = parent.getParent();
}
ICompilationUnit iCompilationUnit = (ICompilationUnit)parent;
ASTParser parser = ASTParser.newParser(ASTReader.JLS);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
