}</BUG>
private boolean avoidPullUpMethodDueToSerialization(TypeDeclaration typeDeclaration, Set<VariableDeclaration> fieldsAccessedInMethod, Set<VariableDeclaration> fieldModifiedInMethod) {
Set<VariableDeclaration> allFields = new LinkedHashSet<VariableDeclaration>(fieldsAccessedInMethod);
allFields.addAll(fieldModifiedInMethod);
for(VariableDeclaration localField : allFields) {
<BUG>if(avoidPullUpFieldDueToSerialization(typeDeclaration, localField)) {
return true;</BUG>
}
}
return false;

private boolean sameInitializers(VariableDeclaration localFieldG1, VariableDeclaration localFieldG2) {
return (localFieldG1.getInitializer() == null && localFieldG2.getInitializer() == null) ||
(localFieldG1.getInitializer() != null && localFieldG2.getInitializer() != null &&
localFieldG1.getInitializer().subtreeMatch(new ASTMatcher(), localFieldG2.getInitializer()));
}
private boolean avoidPullUpMethodDueToSerialization(TypeDeclaration typeDeclaration, Set<VariableDeclaration> fieldsAccessedInMethod, Set<VariableDeclaration> fieldModifiedInMethod) {
Set<VariableDeclaration> allFields = new LinkedHashSet<VariableDeclaration>(fieldsAccessedInMethod);
allFields.addAll(fieldModifiedInMethod);
for(VariableDeclaration localField : allFields) {
if(RefactoringUtility.isSerializedField(typeDeclaration, localField)) {
return true;
}
}
return false;
