Program: 12032
Project: 12032
Buggy source:
public ExtractClassRefactoring(IFile sourceFile,CompilationUnit sourceCompilationUnit,TypeDeclaration sourceTypeDeclaration,Set<VariableDeclaration> extractedFieldFragments,Set<MethodDeclaration> extractedMethods,Set<MethodDeclaration> delegateMethods,String extractedTypeName){
  this.sourceFile=sourceFile;
  this.sourceCompilationUnit=sourceCompilationUnit;
  this.sourceTypeDeclaration=sourceTypeDeclaration;
  this.compilationUnitChanges=new LinkedHashMap<ICompilationUnit,CompilationUnitChange>();
  ICompilationUnit sourceICompilationUnit=(ICompilationUnit)sourceCompilationUnit.getJavaElement();
  MultiTextEdit sourceMultiTextEdit=new MultiTextEdit();
  CompilationUnitChange sourceCompilationUnitChange=new CompilationUnitChange("String_Node_Str",sourceICompilationUnit);
  sourceCompilationUnitChange.setEdit(sourceMultiTextEdit);
  this.compilationUnitChanges.put(sourceICompilationUnit,sourceCompilationUnitChange);
  this.createCompilationUnitChanges=new LinkedHashMap<ICompilationUnit,CreateCompilationUnitChange>();
  this.javaElementsToOpenInEditor=new LinkedHashSet<IJavaElement>();
  this.requiredImportDeclarationsInExtractedClass=new LinkedHashSet<ITypeBinding>();
  this.additionalArgumentsAddedToExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<PlainVariable>>();
  this.additionalParametersAddedToExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<SingleVariableDeclaration>>();
  this.sourceMethodBindingsChangedWithPublicModifier=new LinkedHashSet<String>();
  this.sourceFieldBindingsWithCreatedSetterMethod=new LinkedHashSet<String>();
  this.sourceFieldBindingsWithCreatedGetterMethod=new LinkedHashSet<String>();
  this.fieldDeclarationsChangedWithPublicModifier=new LinkedHashSet<FieldDeclaration>();
  this.memberTypeDeclarationsChangedWithPublicModifier=new LinkedHashSet<TypeDeclaration>();
  this.oldMethodInvocationsWithinExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<MethodInvocation>>();
  this.newMethodInvocationsWithinExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<MethodInvocation>>();
  this.oldToNewExtractedMethodDeclarationMap=new LinkedHashMap<MethodDeclaration,MethodDeclaration>();
  this.extractedFieldFragments=extractedFieldFragments;
  this.extractedMethods=extractedMethods;
  this.delegateMethods=delegateMethods;
  this.extractedTypeName=extractedTypeName;
  this.leaveDelegateForPublicMethods=false;
  this.statementRewriteMap=new LinkedHashMap<Statement,ASTRewrite>();
  this.constructorFinalFieldAssignmentMap=new LinkedHashMap<MethodDeclaration,Map<VariableDeclaration,Assignment>>();
  this.extractedClassConstructorParameterMap=new LinkedHashMap<MethodDeclaration,Set<VariableDeclaration>>();
  this.extractedFieldsWithThisExpressionInTheirInitializer=new LinkedHashSet<VariableDeclaration>();
  for (  MethodDeclaration extractedMethod : extractedMethods) {
    additionalArgumentsAddedToExtractedMethods.put(extractedMethod,new LinkedHashSet<PlainVariable>());
    additionalParametersAddedToExtractedMethods.put(extractedMethod,new LinkedHashSet<SingleVariableDeclaration>());
  }
}

Fixed version (ground truth):
public ExtractClassRefactoring(IFile sourceFile,CompilationUnit sourceCompilationUnit,TypeDeclaration sourceTypeDeclaration,Set<VariableDeclaration> extractedFieldFragments,Set<MethodDeclaration> extractedMethods,Set<MethodDeclaration> delegateMethods,String extractedTypeName){
  this.sourceFile=sourceFile;
  this.sourceCompilationUnit=sourceCompilationUnit;
  this.sourceTypeDeclaration=sourceTypeDeclaration;
  this.compilationUnitChanges=new LinkedHashMap<ICompilationUnit,CompilationUnitChange>();
  ICompilationUnit sourceICompilationUnit=(ICompilationUnit)sourceCompilationUnit.getJavaElement();
  MultiTextEdit sourceMultiTextEdit=new MultiTextEdit();
  CompilationUnitChange sourceCompilationUnitChange=new CompilationUnitChange("String_Node_Str",sourceICompilationUnit);
  sourceCompilationUnitChange.setEdit(sourceMultiTextEdit);
  this.compilationUnitChanges.put(sourceICompilationUnit,sourceCompilationUnitChange);
  this.createCompilationUnitChanges=new LinkedHashMap<ICompilationUnit,CreateCompilationUnitChange>();
  this.javaElementsToOpenInEditor=new LinkedHashSet<IJavaElement>();
  this.requiredImportDeclarationsInExtractedClass=new LinkedHashSet<ITypeBinding>();
  this.additionalArgumentsAddedToExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<PlainVariable>>();
  this.additionalParametersAddedToExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<SingleVariableDeclaration>>();
  this.sourceMethodBindingsChangedWithPublicModifier=new LinkedHashSet<String>();
  this.sourceFieldBindingsWithCreatedSetterMethod=new LinkedHashSet<String>();
  this.sourceFieldBindingsWithCreatedGetterMethod=new LinkedHashSet<String>();
  this.fieldDeclarationsChangedWithPublicModifier=new LinkedHashSet<FieldDeclaration>();
  this.memberTypeDeclarationsChangedWithPublicModifier=new LinkedHashSet<BodyDeclaration>();
  this.oldMethodInvocationsWithinExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<MethodInvocation>>();
  this.newMethodInvocationsWithinExtractedMethods=new LinkedHashMap<MethodDeclaration,Set<MethodInvocation>>();
  this.oldToNewExtractedMethodDeclarationMap=new LinkedHashMap<MethodDeclaration,MethodDeclaration>();
  this.extractedFieldFragments=extractedFieldFragments;
  this.extractedMethods=extractedMethods;
  this.delegateMethods=delegateMethods;
  this.extractedTypeName=extractedTypeName;
  this.leaveDelegateForPublicMethods=false;
  this.statementRewriteMap=new LinkedHashMap<Statement,ASTRewrite>();
  this.constructorFinalFieldAssignmentMap=new LinkedHashMap<MethodDeclaration,Map<VariableDeclaration,Assignment>>();
  this.extractedClassConstructorParameterMap=new LinkedHashMap<MethodDeclaration,Set<VariableDeclaration>>();
  this.extractedFieldsWithThisExpressionInTheirInitializer=new LinkedHashSet<VariableDeclaration>();
  for (  MethodDeclaration extractedMethod : extractedMethods) {
    additionalArgumentsAddedToExtractedMethods.put(extractedMethod,new LinkedHashSet<PlainVariable>());
    additionalParametersAddedToExtractedMethods.put(extractedMethod,new LinkedHashSet<SingleVariableDeclaration>());
  }
}