cd /tmp/Nopol_Defects4J_Closure_51; export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8; TZ="America/New_York"; export TZ; export PATH="/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/:$PATH"; export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/"; time java -Xmx4048m -cp /home/tdurieux/defects4j4repair/script/../repair_tools/nopol.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin//../lib/tools.jar fr.inria.lille.repair.Main \ --mode repair \ --type pre_then_cond \ --oracle angelic \ --synthesis smt \ --flocal gzoltar \ --json \ --solver z3 \ --solver-path /home/tdurieux/defects4j4repair/script/../libs/z3/build/z3 \ --complianceLevel 6 \ --source src/ \ --classpath "build/classes/:build/test/:/tmp/Nopol_Defects4J_Closure_51/build/classes:/tmp/Nopol_Defects4J_Closure_51/build/test:/tmp/Nopol_Defects4J_Closure_51/build/lib/rhino.jar:/tmp/Nopol_Defects4J_Closure_51/lib/ant.jar:/tmp/Nopol_Defects4J_Closure_51/lib/ant-launcher.jar:/tmp/Nopol_Defects4J_Closure_51/lib/args4j.jar:/tmp/Nopol_Defects4J_Closure_51/lib/guava.jar:/tmp/Nopol_Defects4J_Closure_51/lib/jarjar.jar:/tmp/Nopol_Defects4J_Closure_51/lib/json.jar:/tmp/Nopol_Defects4J_Closure_51/lib/jsr305.jar:/tmp/Nopol_Defects4J_Closure_51/lib/junit.jar:/tmp/Nopol_Defects4J_Closure_51/lib/caja-r4314.jar:/tmp/Nopol_Defects4J_Closure_51/lib/protobuf-java.jar:/home/tdurieux/defects4j4repair/script/../repair_tools/nopol.jar"; echo "\n\nNode: `hostname`\n"; echo "\n\nDate: `date`\n"; Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 20:19:27.956 [main] INFO fr.inria.lille.repair.nopol.NoPol - Source files: [src] 20:19:27.968 [main] INFO fr.inria.lille.repair.nopol.NoPol - Classpath: [file:/tmp/Nopol_Defects4J_Closure_51/build/classes/, file:/tmp/Nopol_Defects4J_Closure_51/build/test/, file:/tmp/Nopol_Defects4J_Closure_51/build/classes/, file:/tmp/Nopol_Defects4J_Closure_51/build/test/, file:/tmp/Nopol_Defects4J_Closure_51/build/lib/rhino.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/ant.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/ant-launcher.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/args4j.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/guava.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/jarjar.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/json.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/jsr305.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/junit.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/caja-r4314.jar, file:/tmp/Nopol_Defects4J_Closure_51/lib/protobuf-java.jar, file:/home/tdurieux/defects4j4repair/script/../repair_tools/nopol.jar] 20:19:27.968 [main] INFO fr.inria.lille.repair.nopol.NoPol - Statement type: PRE_THEN_COND 20:19:27.969 [main] INFO fr.inria.lille.repair.nopol.NoPol - Args: [com.google.debugging.sourcemap.Base64Test, com.google.debugging.sourcemap.Base64Test, com.google.debugging.sourcemap.Base64VLQTest, com.google.debugging.sourcemap.Base64VLQTest, com.google.debugging.sourcemap.SourceMapConsumerV1Test, com.google.debugging.sourcemap.SourceMapConsumerV1Test, com.google.debugging.sourcemap.SourceMapConsumerV2Test, com.google.debugging.sourcemap.SourceMapConsumerV2Test, com.google.debugging.sourcemap.SourceMapGeneratorV1Test, com.google.debugging.sourcemap.SourceMapGeneratorV1Test, com.google.debugging.sourcemap.SourceMapGeneratorV2Test, com.google.debugging.sourcemap.SourceMapGeneratorV2Test, com.google.debugging.sourcemap.SourceMapGeneratorV3Test, com.google.debugging.sourcemap.SourceMapGeneratorV3Test, com.google.javascript.jscomp.AliasExternalsTest, com.google.javascript.jscomp.AliasExternalsTest, com.google.javascript.jscomp.AliasKeywordsTest, com.google.javascript.jscomp.AliasKeywordsTest, com.google.javascript.jscomp.AliasStringsTest, com.google.javascript.jscomp.AliasStringsTest, com.google.javascript.jscomp.AmbiguatePropertiesTest, com.google.javascript.jscomp.AmbiguatePropertiesTest, com.google.javascript.jscomp.AstParallelizerTest, com.google.javascript.jscomp.AstParallelizerTest, com.google.javascript.jscomp.AstValidatorTest, com.google.javascript.jscomp.AstValidatorTest, com.google.javascript.jscomp.BasicErrorManagerTest, com.google.javascript.jscomp.BasicErrorManagerTest, com.google.javascript.jscomp.CallGraphTest, com.google.javascript.jscomp.CallGraphTest, com.google.javascript.jscomp.ChainCallsTest, com.google.javascript.jscomp.ChainCallsTest, com.google.javascript.jscomp.CheckAccessControlsTest, com.google.javascript.jscomp.CheckAccessControlsTest, com.google.javascript.jscomp.CheckAccidentalSemicolonTest, com.google.javascript.jscomp.CheckAccidentalSemicolonTest, com.google.javascript.jscomp.CheckGlobalNamesTest, com.google.javascript.jscomp.CheckGlobalNamesTest, com.google.javascript.jscomp.CheckGlobalThisTest, com.google.javascript.jscomp.CheckGlobalThisTest, com.google.javascript.jscomp.CheckMissingGetCssNameTest, com.google.javascript.jscomp.CheckMissingGetCssNameTest, com.google.javascript.jscomp.CheckMissingReturnTest, com.google.javascript.jscomp.CheckMissingReturnTest, com.google.javascript.jscomp.CheckPathsBetweenNodesTest, com.google.javascript.jscomp.CheckPathsBetweenNodesTest, com.google.javascript.jscomp.CheckPropertyOrderTest, com.google.javascript.jscomp.CheckPropertyOrderTest, com.google.javascript.jscomp.CheckProvidesTest, com.google.javascript.jscomp.CheckProvidesTest, com.google.javascript.jscomp.CheckRegExpTest, com.google.javascript.jscomp.CheckRegExpTest, com.google.javascript.jscomp.CheckRequiresForConstructorsTest, com.google.javascript.jscomp.CheckRequiresForConstructorsTest, com.google.javascript.jscomp.CheckSideEffectsTest, com.google.javascript.jscomp.CheckSideEffectsTest, com.google.javascript.jscomp.CheckUnreachableCodeTest, com.google.javascript.jscomp.CheckUnreachableCodeTest, com.google.javascript.jscomp.ClosureCodeRemovalTest, com.google.javascript.jscomp.ClosureCodeRemovalTest, com.google.javascript.jscomp.ClosureCodingConventionTest, com.google.javascript.jscomp.ClosureCodingConventionTest, com.google.javascript.jscomp.ClosureOptimizePrimitivesTest, com.google.javascript.jscomp.ClosureOptimizePrimitivesTest, com.google.javascript.jscomp.ClosureReverseAbstractInterpreterTest, com.google.javascript.jscomp.ClosureReverseAbstractInterpreterTest, com.google.javascript.jscomp.CoalesceVariableNamesTest, com.google.javascript.jscomp.CoalesceVariableNamesTest, com.google.javascript.jscomp.CodePrinterTest, com.google.javascript.jscomp.CodePrinterTest, com.google.javascript.jscomp.CollapseAnonymousFunctionsTest, com.google.javascript.jscomp.CollapseAnonymousFunctionsTest, com.google.javascript.jscomp.CollapsePropertiesTest, com.google.javascript.jscomp.CollapsePropertiesTest, com.google.javascript.jscomp.CollapseVariableDeclarationsTest, com.google.javascript.jscomp.CollapseVariableDeclarationsTest, com.google.javascript.jscomp.CombinedCompilerPassTest, com.google.javascript.jscomp.CombinedCompilerPassTest, com.google.javascript.jscomp.CommandLineRunnerTest, com.google.javascript.jscomp.CommandLineRunnerTest, com.google.javascript.jscomp.CompilerOptionsTest, com.google.javascript.jscomp.CompilerOptionsTest, com.google.javascript.jscomp.CompilerTest, com.google.javascript.jscomp.CompilerTest, com.google.javascript.jscomp.ConcreteTypeTest, com.google.javascript.jscomp.ConcreteTypeTest, com.google.javascript.jscomp.ConstCheckTest, com.google.javascript.jscomp.ConstCheckTest, com.google.javascript.jscomp.ControlFlowAnalysisTest, com.google.javascript.jscomp.ControlFlowAnalysisTest, com.google.javascript.jscomp.ControlStructureCheckTest, com.google.javascript.jscomp.ControlStructureCheckTest, com.google.javascript.jscomp.ConvertToDottedPropertiesTest, com.google.javascript.jscomp.ConvertToDottedPropertiesTest, com.google.javascript.jscomp.CreateSyntheticBlocksTest, com.google.javascript.jscomp.CreateSyntheticBlocksTest, com.google.javascript.jscomp.CrossModuleCodeMotionTest, com.google.javascript.jscomp.CrossModuleCodeMotionTest, com.google.javascript.jscomp.CrossModuleMethodMotionTest, com.google.javascript.jscomp.CrossModuleMethodMotionTest, com.google.javascript.jscomp.DataFlowAnalysisTest, com.google.javascript.jscomp.DataFlowAnalysisTest, com.google.javascript.jscomp.DeadAssignmentsEliminationTest, com.google.javascript.jscomp.DeadAssignmentsEliminationTest, com.google.javascript.jscomp.DefaultCodingConventionTest, com.google.javascript.jscomp.DefaultCodingConventionTest, com.google.javascript.jscomp.DefinitionsRemoverTest, com.google.javascript.jscomp.DefinitionsRemoverTest, com.google.javascript.jscomp.DenormalizeTest, com.google.javascript.jscomp.DenormalizeTest, com.google.javascript.jscomp.DevirtualizePrototypeMethodsTest, com.google.javascript.jscomp.DevirtualizePrototypeMethodsTest, com.google.javascript.jscomp.DiagnosticGroupTest, com.google.javascript.jscomp.DiagnosticGroupTest, com.google.javascript.jscomp.DisambiguatePropertiesTest, com.google.javascript.jscomp.DisambiguatePropertiesTest, com.google.javascript.jscomp.DotFormatterTest, com.google.javascript.jscomp.DotFormatterTest, com.google.javascript.jscomp.ExploitAssignsTest, com.google.javascript.jscomp.ExploitAssignsTest, com.google.javascript.jscomp.ExportTestFunctionsTest, com.google.javascript.jscomp.ExportTestFunctionsTest, com.google.javascript.jscomp.ExpressionDecomposerTest, com.google.javascript.jscomp.ExpressionDecomposerTest, com.google.javascript.jscomp.ExternExportsPassTest, com.google.javascript.jscomp.ExternExportsPassTest, com.google.javascript.jscomp.ExtractPrototypeMemberDeclarationsTest, com.google.javascript.jscomp.ExtractPrototypeMemberDeclarationsTest, com.google.javascript.jscomp.FixedPointGraphTraversalTest, com.google.javascript.jscomp.FixedPointGraphTraversalTest, com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest, com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest, com.google.javascript.jscomp.FunctionArgumentInjectorTest, com.google.javascript.jscomp.FunctionArgumentInjectorTest, com.google.javascript.jscomp.FunctionInjectorTest, com.google.javascript.jscomp.FunctionInjectorTest, com.google.javascript.jscomp.FunctionNamesTest, com.google.javascript.jscomp.FunctionNamesTest, com.google.javascript.jscomp.FunctionRewriterTest, com.google.javascript.jscomp.FunctionRewriterTest, com.google.javascript.jscomp.FunctionToBlockMutatorTest, com.google.javascript.jscomp.FunctionToBlockMutatorTest, com.google.javascript.jscomp.FunctionTypeBuilderTest, com.google.javascript.jscomp.FunctionTypeBuilderTest, com.google.javascript.jscomp.GatherRawExportsTest, com.google.javascript.jscomp.GatherRawExportsTest, com.google.javascript.jscomp.GatherSideEffectSubexpressionsCallbackTest, com.google.javascript.jscomp.GatherSideEffectSubexpressionsCallbackTest, com.google.javascript.jscomp.GenerateExportsTest, com.google.javascript.jscomp.GenerateExportsTest, com.google.javascript.jscomp.GlobalNamespaceTest, com.google.javascript.jscomp.GlobalNamespaceTest, com.google.javascript.jscomp.GlobalVarReferenceMapTest, com.google.javascript.jscomp.GlobalVarReferenceMapTest, com.google.javascript.jscomp.GoogleCodingConventionTest, com.google.javascript.jscomp.GoogleCodingConventionTest, com.google.javascript.jscomp.GroupVariableDeclarationsTest, com.google.javascript.jscomp.GroupVariableDeclarationsTest, com.google.javascript.jscomp.IgnoreCajaPropertiesTest, com.google.javascript.jscomp.IgnoreCajaPropertiesTest, com.google.javascript.jscomp.InferJSDocInfoTest, com.google.javascript.jscomp.InferJSDocInfoTest, com.google.javascript.jscomp.InlineCostEstimatorTest, com.google.javascript.jscomp.InlineCostEstimatorTest, com.google.javascript.jscomp.InlineFunctionsTest, com.google.javascript.jscomp.InlineFunctionsTest, com.google.javascript.jscomp.InlineObjectLiteralsTest, com.google.javascript.jscomp.InlineObjectLiteralsTest, com.google.javascript.jscomp.InlineSimpleMethodsTest, com.google.javascript.jscomp.InlineSimpleMethodsTest, com.google.javascript.jscomp.InlineVariablesConstantsTest, com.google.javascript.jscomp.InlineVariablesConstantsTest, com.google.javascript.jscomp.InlineVariablesTest, com.google.javascript.jscomp.InlineVariablesTest, com.google.javascript.jscomp.InstrumentFunctionsTest, com.google.javascript.jscomp.InstrumentFunctionsTest, com.google.javascript.jscomp.JSCompilerSourceExcerptProviderTest, com.google.javascript.jscomp.JSCompilerSourceExcerptProviderTest, com.google.javascript.jscomp.JSModuleGraphTest, com.google.javascript.jscomp.JSModuleGraphTest, com.google.javascript.jscomp.JSModuleTest, com.google.javascript.jscomp.JSModuleTest, com.google.javascript.jscomp.JsMessageExtractorTest, com.google.javascript.jscomp.JsMessageExtractorTest, com.google.javascript.jscomp.JsMessageTest, com.google.javascript.jscomp.JsMessageTest, com.google.javascript.jscomp.JsMessageVisitorTest, com.google.javascript.jscomp.JsMessageVisitorTest, com.google.javascript.jscomp.LightweightMessageFormatterTest, com.google.javascript.jscomp.LightweightMessageFormatterTest, com.google.javascript.jscomp.LinkedFlowScopeTest, com.google.javascript.jscomp.LinkedFlowScopeTest, com.google.javascript.jscomp.LiveVariableAnalysisTest, com.google.javascript.jscomp.LiveVariableAnalysisTest, com.google.javascript.jscomp.LooseTypeCheckTest, com.google.javascript.jscomp.LooseTypeCheckTest, com.google.javascript.jscomp.MakeDeclaredNamesUniqueTest, com.google.javascript.jscomp.MakeDeclaredNamesUniqueTest, com.google.javascript.jscomp.MarkNoSideEffectCallsTest, com.google.javascript.jscomp.MarkNoSideEffectCallsTest, com.google.javascript.jscomp.MaybeReachingVariableUseTest, com.google.javascript.jscomp.MaybeReachingVariableUseTest, com.google.javascript.jscomp.MemoizedScopeCreatorTest, com.google.javascript.jscomp.MemoizedScopeCreatorTest, com.google.javascript.jscomp.MinimizeExitPointsTest, com.google.javascript.jscomp.MinimizeExitPointsTest, com.google.javascript.jscomp.MoveFunctionDeclarationsTest, com.google.javascript.jscomp.MoveFunctionDeclarationsTest, com.google.javascript.jscomp.MustBeReachingVariableDefTest, com.google.javascript.jscomp.MustBeReachingVariableDefTest, com.google.javascript.jscomp.NameAnalyzerTest, com.google.javascript.jscomp.NameAnalyzerTest, com.google.javascript.jscomp.NameAnonymousFunctionsMappedTest, com.google.javascript.jscomp.NameAnonymousFunctionsMappedTest, com.google.javascript.jscomp.NameAnonymousFunctionsTest, com.google.javascript.jscomp.NameAnonymousFunctionsTest, com.google.javascript.jscomp.NodeIteratorsTest, com.google.javascript.jscomp.NodeIteratorsTest, com.google.javascript.jscomp.NodeTraversalTest, com.google.javascript.jscomp.NodeTraversalTest, com.google.javascript.jscomp.NodeUtilTest, com.google.javascript.jscomp.NodeUtilTest, com.google.javascript.jscomp.NormalizeTest, com.google.javascript.jscomp.NormalizeTest, com.google.javascript.jscomp.ObjectPropertyStringPostprocessTest, com.google.javascript.jscomp.ObjectPropertyStringPostprocessTest, com.google.javascript.jscomp.ObjectPropertyStringPreprocessTest, com.google.javascript.jscomp.ObjectPropertyStringPreprocessTest, com.google.javascript.jscomp.OperaCompoundAssignFixTest, com.google.javascript.jscomp.OperaCompoundAssignFixTest, com.google.javascript.jscomp.OptimizeArgumentsArrayTest, com.google.javascript.jscomp.OptimizeArgumentsArrayTest, com.google.javascript.jscomp.OptimizeCallsTest, com.google.javascript.jscomp.OptimizeCallsTest, com.google.javascript.jscomp.OptimizeParametersTest, com.google.javascript.jscomp.OptimizeParametersTest, com.google.javascript.jscomp.OptimizeReturnsTest, com.google.javascript.jscomp.OptimizeReturnsTest, com.google.javascript.jscomp.ParallelCompilerPassTest, com.google.javascript.jscomp.ParallelCompilerPassTest, com.google.javascript.jscomp.PeepholeCollectPropertyAssignmentsTest, com.google.javascript.jscomp.PeepholeCollectPropertyAssignmentsTest, com.google.javascript.jscomp.PeepholeFoldConstantsTest, com.google.javascript.jscomp.PeepholeFoldConstantsTest, com.google.javascript.jscomp.PeepholeFoldWithTypesTest, com.google.javascript.jscomp.PeepholeFoldWithTypesTest, com.google.javascript.jscomp.PeepholeIntegrationTest, com.google.javascript.jscomp.PeepholeIntegrationTest, com.google.javascript.jscomp.PeepholeOptimizationsPassTest, com.google.javascript.jscomp.PeepholeOptimizationsPassTest, com.google.javascript.jscomp.PeepholeRemoveDeadCodeTest, com.google.javascript.jscomp.PeepholeRemoveDeadCodeTest, com.google.javascript.jscomp.PeepholeReplaceKnownMethodsTest, com.google.javascript.jscomp.PeepholeReplaceKnownMethodsTest, com.google.javascript.jscomp.PeepholeSimplifyRegExpTest, com.google.javascript.jscomp.PeepholeSimplifyRegExpTest, com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest, com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest, com.google.javascript.jscomp.PhaseOptimizerTest, com.google.javascript.jscomp.PhaseOptimizerTest, com.google.javascript.jscomp.PrepareAstTest, com.google.javascript.jscomp.PrepareAstTest, com.google.javascript.jscomp.ProcessClosurePrimitivesTest, com.google.javascript.jscomp.ProcessClosurePrimitivesTest, com.google.javascript.jscomp.ProcessDefinesTest, com.google.javascript.jscomp.ProcessDefinesTest, com.google.javascript.jscomp.ProcessTweaksTest, com.google.javascript.jscomp.ProcessTweaksTest, com.google.javascript.jscomp.PureFunctionIdentifierTest, com.google.javascript.jscomp.PureFunctionIdentifierTest, com.google.javascript.jscomp.RecordFunctionInformationTest, com.google.javascript.jscomp.RecordFunctionInformationTest, com.google.javascript.jscomp.RemoveTryCatchTest, com.google.javascript.jscomp.RemoveTryCatchTest, com.google.javascript.jscomp.RemoveUnusedNamesTest, com.google.javascript.jscomp.RemoveUnusedNamesTest, com.google.javascript.jscomp.RemoveUnusedPrototypePropertiesTest, com.google.javascript.jscomp.RemoveUnusedPrototypePropertiesTest, com.google.javascript.jscomp.RemoveUnusedVarsTest, com.google.javascript.jscomp.RemoveUnusedVarsTest, com.google.javascript.jscomp.RenameLabelsTest, com.google.javascript.jscomp.RenameLabelsTest, com.google.javascript.jscomp.RenameLocalVarsTest, com.google.javascript.jscomp.RenameLocalVarsTest, com.google.javascript.jscomp.RenamePropertiesTest, com.google.javascript.jscomp.RenamePropertiesTest, com.google.javascript.jscomp.RenamePrototypesTest, com.google.javascript.jscomp.RenamePrototypesTest, com.google.javascript.jscomp.RenameVarsTest, com.google.javascript.jscomp.RenameVarsTest, com.google.javascript.jscomp.ReorderConstantExpressionTest, com.google.javascript.jscomp.ReorderConstantExpressionTest, com.google.javascript.jscomp.ReplaceCssNamesTest, com.google.javascript.jscomp.ReplaceCssNamesTest, com.google.javascript.jscomp.ReplaceIdGeneratorsTest, com.google.javascript.jscomp.ReplaceIdGeneratorsTest, com.google.javascript.jscomp.ReplaceMessagesTest, com.google.javascript.jscomp.ReplaceMessagesTest, com.google.javascript.jscomp.ReplaceStringsTest, com.google.javascript.jscomp.ReplaceStringsTest, com.google.javascript.jscomp.RhinoErrorReporterTest, com.google.javascript.jscomp.RhinoErrorReporterTest, com.google.javascript.jscomp.RuntimeTypeCheckTest, com.google.javascript.jscomp.RuntimeTypeCheckTest, com.google.javascript.jscomp.SanityCheckTest, com.google.javascript.jscomp.SanityCheckTest, com.google.javascript.jscomp.ScopedAliasesTest, com.google.javascript.jscomp.ScopedAliasesTest, com.google.javascript.jscomp.SemanticReverseAbstractInterpreterTest, com.google.javascript.jscomp.SemanticReverseAbstractInterpreterTest, com.google.javascript.jscomp.ShadowVariablesTest, com.google.javascript.jscomp.ShadowVariablesTest, com.google.javascript.jscomp.SideEffectsAnalysisTest, com.google.javascript.jscomp.SideEffectsAnalysisTest, com.google.javascript.jscomp.SimpleDefinitionFinderTest, com.google.javascript.jscomp.SimpleDefinitionFinderTest, com.google.javascript.jscomp.SimpleFunctionAliasAnalysisTest, com.google.javascript.jscomp.SimpleFunctionAliasAnalysisTest, com.google.javascript.jscomp.SourceInformationAnnotatorTest, com.google.javascript.jscomp.SourceInformationAnnotatorTest, com.google.javascript.jscomp.SourceMapTest, com.google.javascript.jscomp.SourceMapTest, com.google.javascript.jscomp.SpecializeModuleTest, com.google.javascript.jscomp.SpecializeModuleTest, com.google.javascript.jscomp.StatementFusionTest, com.google.javascript.jscomp.StatementFusionTest, com.google.javascript.jscomp.StrictModeCheckTest, com.google.javascript.jscomp.StrictModeCheckTest, com.google.javascript.jscomp.StripCodeTest, com.google.javascript.jscomp.StripCodeTest, com.google.javascript.jscomp.SymbolTableTest, com.google.javascript.jscomp.SymbolTableTest, com.google.javascript.jscomp.SyntacticScopeCreatorTest, com.google.javascript.jscomp.SyntacticScopeCreatorTest, com.google.javascript.jscomp.TightenTypesTest, com.google.javascript.jscomp.TightenTypesTest, com.google.javascript.jscomp.TypeCheckFunctionCheckTest, com.google.javascript.jscomp.TypeCheckFunctionCheckTest, com.google.javascript.jscomp.TypeCheckTest, com.google.javascript.jscomp.TypeCheckTest, com.google.javascript.jscomp.TypeInferenceTest, com.google.javascript.jscomp.TypeInferenceTest, com.google.javascript.jscomp.TypeValidatorTest, com.google.javascript.jscomp.TypeValidatorTest, com.google.javascript.jscomp.TypedScopeCreatorTest, com.google.javascript.jscomp.TypedScopeCreatorTest, com.google.javascript.jscomp.UnfoldCompoundAssignmentsTest, com.google.javascript.jscomp.UnfoldCompoundAssignmentsTest, com.google.javascript.jscomp.UnreachableCodeEliminationTest, com.google.javascript.jscomp.UnreachableCodeEliminationTest, com.google.javascript.jscomp.VarCheckTest, com.google.javascript.jscomp.VarCheckTest, com.google.javascript.jscomp.VariableMapTest, com.google.javascript.jscomp.VariableMapTest, com.google.javascript.jscomp.VariableReferenceCheckTest, com.google.javascript.jscomp.VariableReferenceCheckTest, com.google.javascript.jscomp.VariableShadowDeclarationCheckTest, com.google.javascript.jscomp.VariableShadowDeclarationCheckTest, com.google.javascript.jscomp.VariableVisibilityAnalysisTest, com.google.javascript.jscomp.VariableVisibilityAnalysisTest, com.google.javascript.jscomp.XtbMessageBundleTest, com.google.javascript.jscomp.XtbMessageBundleTest, com.google.javascript.jscomp.deps.DepsFileParserTest, com.google.javascript.jscomp.deps.DepsFileParserTest, com.google.javascript.jscomp.deps.JsFileLineParserTest, com.google.javascript.jscomp.deps.JsFileLineParserTest, com.google.javascript.jscomp.deps.JsFileParserTest, com.google.javascript.jscomp.deps.JsFileParserTest, com.google.javascript.jscomp.deps.JsFunctionParserTest, com.google.javascript.jscomp.deps.JsFunctionParserTest, com.google.javascript.jscomp.deps.SortedDependenciesTest, com.google.javascript.jscomp.deps.SortedDependenciesTest, com.google.javascript.jscomp.graph.GraphColoringTest, com.google.javascript.jscomp.graph.GraphColoringTest, com.google.javascript.jscomp.graph.GraphPrunerTest, com.google.javascript.jscomp.graph.GraphPrunerTest, com.google.javascript.jscomp.graph.GraphReachabilityTest, com.google.javascript.jscomp.graph.GraphReachabilityTest, com.google.javascript.jscomp.graph.GraphTest, com.google.javascript.jscomp.graph.GraphTest, com.google.javascript.jscomp.graph.StandardUnionFindTest, com.google.javascript.jscomp.graph.StandardUnionFindTest, com.google.javascript.jscomp.jsonml.JsonMLConversionTest, com.google.javascript.jscomp.jsonml.JsonMLConversionTest, com.google.javascript.jscomp.jsonml.JsonMLValidationTest, com.google.javascript.jscomp.jsonml.JsonMLValidationTest, com.google.javascript.jscomp.jsonml.SecureCompilerTest, com.google.javascript.jscomp.jsonml.SecureCompilerTest, com.google.javascript.jscomp.parsing.IRFactoryTest, com.google.javascript.jscomp.parsing.IRFactoryTest, com.google.javascript.jscomp.parsing.JsDocInfoParserTest, com.google.javascript.jscomp.parsing.JsDocInfoParserTest, com.google.javascript.jscomp.parsing.JsDocTokenStreamTest, com.google.javascript.jscomp.parsing.JsDocTokenStreamTest, com.google.javascript.jscomp.parsing.ParserTest, com.google.javascript.jscomp.parsing.ParserTest, com.google.javascript.jscomp.regex.CharRangesTest, com.google.javascript.jscomp.regex.CharRangesTest, com.google.javascript.rhino.JSDocInfoTest, com.google.javascript.rhino.JSDocInfoTest, com.google.javascript.rhino.NodeTest, com.google.javascript.rhino.NodeTest, com.google.javascript.rhino.ParserTest, com.google.javascript.rhino.ParserTest, com.google.javascript.rhino.TokenStreamTest, com.google.javascript.rhino.TokenStreamTest, com.google.javascript.rhino.jstype.BooleanLiteralSetTest, com.google.javascript.rhino.jstype.BooleanLiteralSetTest, com.google.javascript.rhino.jstype.EnumElementTypeTest, com.google.javascript.rhino.jstype.EnumElementTypeTest, com.google.javascript.rhino.jstype.FunctionParamBuilderTest, com.google.javascript.rhino.jstype.FunctionParamBuilderTest, com.google.javascript.rhino.jstype.FunctionTypeTest, com.google.javascript.rhino.jstype.FunctionTypeTest, com.google.javascript.rhino.jstype.JSTypeRegistryTest, com.google.javascript.rhino.jstype.JSTypeRegistryTest, com.google.javascript.rhino.jstype.JSTypeTest, com.google.javascript.rhino.jstype.JSTypeTest, com.google.javascript.rhino.jstype.NamedTypeTest, com.google.javascript.rhino.jstype.NamedTypeTest, com.google.javascript.rhino.jstype.PrototypeObjectTypeTest, com.google.javascript.rhino.jstype.PrototypeObjectTypeTest, com.google.javascript.rhino.jstype.RecordTypeTest, com.google.javascript.rhino.jstype.RecordTypeTest, com.google.javascript.rhino.jstype.TernaryValueTest, com.google.javascript.rhino.jstype.TernaryValueTest, com.google.javascript.rhino.jstype.UnionTypeBuilderTest, com.google.javascript.rhino.jstype.UnionTypeBuilderTest, com.google.javascript.rhino.jstype.UnionTypeTest, com.google.javascript.rhino.jstype.UnionTypeTest] 20:19:27.971 [main] INFO fr.inria.lille.repair.nopol.NoPol - Config: Config{synthesisDepth=3, collectStaticMethods=true, collectStaticFields=false, collectLiterals=false, onlyOneSynthesisResult=true, sortExpressions=true, maxLineInvocationPerTest=250, timeoutMethodInvocation=2000, dataCollectionTimeoutInSecondForSynthesis=900, addWeight=0.19478, subWeight=0.04554, mulWeight=0.0102, divWeight=0.00613, andWeight=0.10597, orWeight=0.05708, eqWeight=0.22798, nEqWeight=0.0, lessEqWeight=0.0255, lessWeight=0.0947, methodCallWeight=0.1, fieldAccessWeight=0.08099, constantWeight=0.14232, variableWeight=0.05195, mode=REPAIR, type=PRE_THEN_COND, synthesis=SMT, oracle=ANGELIC, solver=Z3, solverPath='/home/tdurieux/defects4j4repair/script/../libs/z3/build/z3', projectSources=[src], projectClasspath='[Ljava.net.URL;@66d33a', projectTests=[com.google.debugging.sourcemap.Base64Test, com.google.debugging.sourcemap.Base64Test, com.google.debugging.sourcemap.Base64VLQTest, com.google.debugging.sourcemap.Base64VLQTest, com.google.debugging.sourcemap.SourceMapConsumerV1Test, com.google.debugging.sourcemap.SourceMapConsumerV1Test, com.google.debugging.sourcemap.SourceMapConsumerV2Test, com.google.debugging.sourcemap.SourceMapConsumerV2Test, com.google.debugging.sourcemap.SourceMapGeneratorV1Test, com.google.debugging.sourcemap.SourceMapGeneratorV1Test, com.google.debugging.sourcemap.SourceMapGeneratorV2Test, com.google.debugging.sourcemap.SourceMapGeneratorV2Test, com.google.debugging.sourcemap.SourceMapGeneratorV3Test, com.google.debugging.sourcemap.SourceMapGeneratorV3Test, com.google.javascript.jscomp.AliasExternalsTest, com.google.javascript.jscomp.AliasExternalsTest, com.google.javascript.jscomp.AliasKeywordsTest, com.google.javascript.jscomp.AliasKeywordsTest, com.google.javascript.jscomp.AliasStringsTest, com.google.javascript.jscomp.AliasStringsTest, com.google.javascript.jscomp.AmbiguatePropertiesTest, com.google.javascript.jscomp.AmbiguatePropertiesTest, com.google.javascript.jscomp.AstParallelizerTest, com.google.javascript.jscomp.AstParallelizerTest, com.google.javascript.jscomp.AstValidatorTest, com.google.javascript.jscomp.AstValidatorTest, com.google.javascript.jscomp.BasicErrorManagerTest, com.google.javascript.jscomp.BasicErrorManagerTest, com.google.javascript.jscomp.CallGraphTest, com.google.javascript.jscomp.CallGraphTest, com.google.javascript.jscomp.ChainCallsTest, com.google.javascript.jscomp.ChainCallsTest, com.google.javascript.jscomp.CheckAccessControlsTest, com.google.javascript.jscomp.CheckAccessControlsTest, com.google.javascript.jscomp.CheckAccidentalSemicolonTest, com.google.javascript.jscomp.CheckAccidentalSemicolonTest, com.google.javascript.jscomp.CheckGlobalNamesTest, com.google.javascript.jscomp.CheckGlobalNamesTest, com.google.javascript.jscomp.CheckGlobalThisTest, com.google.javascript.jscomp.CheckGlobalThisTest, com.google.javascript.jscomp.CheckMissingGetCssNameTest, com.google.javascript.jscomp.CheckMissingGetCssNameTest, com.google.javascript.jscomp.CheckMissingReturnTest, com.google.javascript.jscomp.CheckMissingReturnTest, com.google.javascript.jscomp.CheckPathsBetweenNodesTest, com.google.javascript.jscomp.CheckPathsBetweenNodesTest, com.google.javascript.jscomp.CheckPropertyOrderTest, com.google.javascript.jscomp.CheckPropertyOrderTest, com.google.javascript.jscomp.CheckProvidesTest, com.google.javascript.jscomp.CheckProvidesTest, com.google.javascript.jscomp.CheckRegExpTest, com.google.javascript.jscomp.CheckRegExpTest, com.google.javascript.jscomp.CheckRequiresForConstructorsTest, com.google.javascript.jscomp.CheckRequiresForConstructorsTest, com.google.javascript.jscomp.CheckSideEffectsTest, com.google.javascript.jscomp.CheckSideEffectsTest, com.google.javascript.jscomp.CheckUnreachableCodeTest, com.google.javascript.jscomp.CheckUnreachableCodeTest, com.google.javascript.jscomp.ClosureCodeRemovalTest, com.google.javascript.jscomp.ClosureCodeRemovalTest, com.google.javascript.jscomp.ClosureCodingConventionTest, com.google.javascript.jscomp.ClosureCodingConventionTest, com.google.javascript.jscomp.ClosureOptimizePrimitivesTest, com.google.javascript.jscomp.ClosureOptimizePrimitivesTest, com.google.javascript.jscomp.ClosureReverseAbstractInterpreterTest, com.google.javascript.jscomp.ClosureReverseAbstractInterpreterTest, com.google.javascript.jscomp.CoalesceVariableNamesTest, com.google.javascript.jscomp.CoalesceVariableNamesTest, com.google.javascript.jscomp.CodePrinterTest, com.google.javascript.jscomp.CodePrinterTest, com.google.javascript.jscomp.CollapseAnonymousFunctionsTest, com.google.javascript.jscomp.CollapseAnonymousFunctionsTest, com.google.javascript.jscomp.CollapsePropertiesTest, com.google.javascript.jscomp.CollapsePropertiesTest, com.google.javascript.jscomp.CollapseVariableDeclarationsTest, com.google.javascript.jscomp.CollapseVariableDeclarationsTest, com.google.javascript.jscomp.CombinedCompilerPassTest, com.google.javascript.jscomp.CombinedCompilerPassTest, com.google.javascript.jscomp.CommandLineRunnerTest, com.google.javascript.jscomp.CommandLineRunnerTest, com.google.javascript.jscomp.CompilerOptionsTest, com.google.javascript.jscomp.CompilerOptionsTest, com.google.javascript.jscomp.CompilerTest, com.google.javascript.jscomp.CompilerTest, com.google.javascript.jscomp.ConcreteTypeTest, com.google.javascript.jscomp.ConcreteTypeTest, com.google.javascript.jscomp.ConstCheckTest, com.google.javascript.jscomp.ConstCheckTest, com.google.javascript.jscomp.ControlFlowAnalysisTest, com.google.javascript.jscomp.ControlFlowAnalysisTest, com.google.javascript.jscomp.ControlStructureCheckTest, com.google.javascript.jscomp.ControlStructureCheckTest, com.google.javascript.jscomp.ConvertToDottedPropertiesTest, com.google.javascript.jscomp.ConvertToDottedPropertiesTest, com.google.javascript.jscomp.CreateSyntheticBlocksTest, com.google.javascript.jscomp.CreateSyntheticBlocksTest, com.google.javascript.jscomp.CrossModuleCodeMotionTest, com.google.javascript.jscomp.CrossModuleCodeMotionTest, com.google.javascript.jscomp.CrossModuleMethodMotionTest, com.google.javascript.jscomp.CrossModuleMethodMotionTest, com.google.javascript.jscomp.DataFlowAnalysisTest, com.google.javascript.jscomp.DataFlowAnalysisTest, com.google.javascript.jscomp.DeadAssignmentsEliminationTest, com.google.javascript.jscomp.DeadAssignmentsEliminationTest, com.google.javascript.jscomp.DefaultCodingConventionTest, com.google.javascript.jscomp.DefaultCodingConventionTest, com.google.javascript.jscomp.DefinitionsRemoverTest, com.google.javascript.jscomp.DefinitionsRemoverTest, com.google.javascript.jscomp.DenormalizeTest, com.google.javascript.jscomp.DenormalizeTest, com.google.javascript.jscomp.DevirtualizePrototypeMethodsTest, com.google.javascript.jscomp.DevirtualizePrototypeMethodsTest, com.google.javascript.jscomp.DiagnosticGroupTest, com.google.javascript.jscomp.DiagnosticGroupTest, com.google.javascript.jscomp.DisambiguatePropertiesTest, com.google.javascript.jscomp.DisambiguatePropertiesTest, com.google.javascript.jscomp.DotFormatterTest, com.google.javascript.jscomp.DotFormatterTest, com.google.javascript.jscomp.ExploitAssignsTest, com.google.javascript.jscomp.ExploitAssignsTest, com.google.javascript.jscomp.ExportTestFunctionsTest, com.google.javascript.jscomp.ExportTestFunctionsTest, com.google.javascript.jscomp.ExpressionDecomposerTest, com.google.javascript.jscomp.ExpressionDecomposerTest, com.google.javascript.jscomp.ExternExportsPassTest, com.google.javascript.jscomp.ExternExportsPassTest, com.google.javascript.jscomp.ExtractPrototypeMemberDeclarationsTest, com.google.javascript.jscomp.ExtractPrototypeMemberDeclarationsTest, com.google.javascript.jscomp.FixedPointGraphTraversalTest, com.google.javascript.jscomp.FixedPointGraphTraversalTest, com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest, com.google.javascript.jscomp.FlowSensitiveInlineVariablesTest, com.google.javascript.jscomp.FunctionArgumentInjectorTest, com.google.javascript.jscomp.FunctionArgumentInjectorTest, com.google.javascript.jscomp.FunctionInjectorTest, com.google.javascript.jscomp.FunctionInjectorTest, com.google.javascript.jscomp.FunctionNamesTest, com.google.javascript.jscomp.FunctionNamesTest, com.google.javascript.jscomp.FunctionRewriterTest, com.google.javascript.jscomp.FunctionRewriterTest, com.google.javascript.jscomp.FunctionToBlockMutatorTest, com.google.javascript.jscomp.FunctionToBlockMutatorTest, com.google.javascript.jscomp.FunctionTypeBuilderTest, com.google.javascript.jscomp.FunctionTypeBuilderTest, com.google.javascript.jscomp.GatherRawExportsTest, com.google.javascript.jscomp.GatherRawExportsTest, com.google.javascript.jscomp.GatherSideEffectSubexpressionsCallbackTest, com.google.javascript.jscomp.GatherSideEffectSubexpressionsCallbackTest, com.google.javascript.jscomp.GenerateExportsTest, com.google.javascript.jscomp.GenerateExportsTest, com.google.javascript.jscomp.GlobalNamespaceTest, com.google.javascript.jscomp.GlobalNamespaceTest, com.google.javascript.jscomp.GlobalVarReferenceMapTest, com.google.javascript.jscomp.GlobalVarReferenceMapTest, com.google.javascript.jscomp.GoogleCodingConventionTest, com.google.javascript.jscomp.GoogleCodingConventionTest, com.google.javascript.jscomp.GroupVariableDeclarationsTest, com.google.javascript.jscomp.GroupVariableDeclarationsTest, com.google.javascript.jscomp.IgnoreCajaPropertiesTest, com.google.javascript.jscomp.IgnoreCajaPropertiesTest, com.google.javascript.jscomp.InferJSDocInfoTest, com.google.javascript.jscomp.InferJSDocInfoTest, com.google.javascript.jscomp.InlineCostEstimatorTest, com.google.javascript.jscomp.InlineCostEstimatorTest, com.google.javascript.jscomp.InlineFunctionsTest, com.google.javascript.jscomp.InlineFunctionsTest, com.google.javascript.jscomp.InlineObjectLiteralsTest, com.google.javascript.jscomp.InlineObjectLiteralsTest, com.google.javascript.jscomp.InlineSimpleMethodsTest, com.google.javascript.jscomp.InlineSimpleMethodsTest, com.google.javascript.jscomp.InlineVariablesConstantsTest, com.google.javascript.jscomp.InlineVariablesConstantsTest, com.google.javascript.jscomp.InlineVariablesTest, com.google.javascript.jscomp.InlineVariablesTest, com.google.javascript.jscomp.InstrumentFunctionsTest, com.google.javascript.jscomp.InstrumentFunctionsTest, com.google.javascript.jscomp.JSCompilerSourceExcerptProviderTest, com.google.javascript.jscomp.JSCompilerSourceExcerptProviderTest, com.google.javascript.jscomp.JSModuleGraphTest, com.google.javascript.jscomp.JSModuleGraphTest, com.google.javascript.jscomp.JSModuleTest, com.google.javascript.jscomp.JSModuleTest, com.google.javascript.jscomp.JsMessageExtractorTest, com.google.javascript.jscomp.JsMessageExtractorTest, com.google.javascript.jscomp.JsMessageTest, com.google.javascript.jscomp.JsMessageTest, com.google.javascript.jscomp.JsMessageVisitorTest, com.google.javascript.jscomp.JsMessageVisitorTest, com.google.javascript.jscomp.LightweightMessageFormatterTest, com.google.javascript.jscomp.LightweightMessageFormatterTest, com.google.javascript.jscomp.LinkedFlowScopeTest, com.google.javascript.jscomp.LinkedFlowScopeTest, com.google.javascript.jscomp.LiveVariableAnalysisTest, com.google.javascript.jscomp.LiveVariableAnalysisTest, com.google.javascript.jscomp.LooseTypeCheckTest, com.google.javascript.jscomp.LooseTypeCheckTest, com.google.javascript.jscomp.MakeDeclaredNamesUniqueTest, com.google.javascript.jscomp.MakeDeclaredNamesUniqueTest, com.google.javascript.jscomp.MarkNoSideEffectCallsTest, com.google.javascript.jscomp.MarkNoSideEffectCallsTest, com.google.javascript.jscomp.MaybeReachingVariableUseTest, com.google.javascript.jscomp.MaybeReachingVariableUseTest, com.google.javascript.jscomp.MemoizedScopeCreatorTest, com.google.javascript.jscomp.MemoizedScopeCreatorTest, com.google.javascript.jscomp.MinimizeExitPointsTest, com.google.javascript.jscomp.MinimizeExitPointsTest, com.google.javascript.jscomp.MoveFunctionDeclarationsTest, com.google.javascript.jscomp.MoveFunctionDeclarationsTest, com.google.javascript.jscomp.MustBeReachingVariableDefTest, com.google.javascript.jscomp.MustBeReachingVariableDefTest, com.google.javascript.jscomp.NameAnalyzerTest, com.google.javascript.jscomp.NameAnalyzerTest, com.google.javascript.jscomp.NameAnonymousFunctionsMappedTest, com.google.javascript.jscomp.NameAnonymousFunctionsMappedTest, com.google.javascript.jscomp.NameAnonymousFunctionsTest, com.google.javascript.jscomp.NameAnonymousFunctionsTest, com.google.javascript.jscomp.NodeIteratorsTest, com.google.javascript.jscomp.NodeIteratorsTest, com.google.javascript.jscomp.NodeTraversalTest, com.google.javascript.jscomp.NodeTraversalTest, com.google.javascript.jscomp.NodeUtilTest, com.google.javascript.jscomp.NodeUtilTest, com.google.javascript.jscomp.NormalizeTest, com.google.javascript.jscomp.NormalizeTest, com.google.javascript.jscomp.ObjectPropertyStringPostprocessTest, com.google.javascript.jscomp.ObjectPropertyStringPostprocessTest, com.google.javascript.jscomp.ObjectPropertyStringPreprocessTest, com.google.javascript.jscomp.ObjectPropertyStringPreprocessTest, com.google.javascript.jscomp.OperaCompoundAssignFixTest, com.google.javascript.jscomp.OperaCompoundAssignFixTest, com.google.javascript.jscomp.OptimizeArgumentsArrayTest, com.google.javascript.jscomp.OptimizeArgumentsArrayTest, com.google.javascript.jscomp.OptimizeCallsTest, com.google.javascript.jscomp.OptimizeCallsTest, com.google.javascript.jscomp.OptimizeParametersTest, com.google.javascript.jscomp.OptimizeParametersTest, com.google.javascript.jscomp.OptimizeReturnsTest, com.google.javascript.jscomp.OptimizeReturnsTest, com.google.javascript.jscomp.ParallelCompilerPassTest, com.google.javascript.jscomp.ParallelCompilerPassTest, com.google.javascript.jscomp.PeepholeCollectPropertyAssignmentsTest, com.google.javascript.jscomp.PeepholeCollectPropertyAssignmentsTest, com.google.javascript.jscomp.PeepholeFoldConstantsTest, com.google.javascript.jscomp.PeepholeFoldConstantsTest, com.google.javascript.jscomp.PeepholeFoldWithTypesTest, com.google.javascript.jscomp.PeepholeFoldWithTypesTest, com.google.javascript.jscomp.PeepholeIntegrationTest, com.google.javascript.jscomp.PeepholeIntegrationTest, com.google.javascript.jscomp.PeepholeOptimizationsPassTest, com.google.javascript.jscomp.PeepholeOptimizationsPassTest, com.google.javascript.jscomp.PeepholeRemoveDeadCodeTest, com.google.javascript.jscomp.PeepholeRemoveDeadCodeTest, com.google.javascript.jscomp.PeepholeReplaceKnownMethodsTest, com.google.javascript.jscomp.PeepholeReplaceKnownMethodsTest, com.google.javascript.jscomp.PeepholeSimplifyRegExpTest, com.google.javascript.jscomp.PeepholeSimplifyRegExpTest, com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest, com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntaxTest, com.google.javascript.jscomp.PhaseOptimizerTest, com.google.javascript.jscomp.PhaseOptimizerTest, com.google.javascript.jscomp.PrepareAstTest, com.google.javascript.jscomp.PrepareAstTest, com.google.javascript.jscomp.ProcessClosurePrimitivesTest, com.google.javascript.jscomp.ProcessClosurePrimitivesTest, com.google.javascript.jscomp.ProcessDefinesTest, com.google.javascript.jscomp.ProcessDefinesTest, com.google.javascript.jscomp.ProcessTweaksTest, com.google.javascript.jscomp.ProcessTweaksTest, com.google.javascript.jscomp.PureFunctionIdentifierTest, com.google.javascript.jscomp.PureFunctionIdentifierTest, com.google.javascript.jscomp.RecordFunctionInformationTest, com.google.javascript.jscomp.RecordFunctionInformationTest, com.google.javascript.jscomp.RemoveTryCatchTest, com.google.javascript.jscomp.RemoveTryCatchTest, com.google.javascript.jscomp.RemoveUnusedNamesTest, com.google.javascript.jscomp.RemoveUnusedNamesTest, com.google.javascript.jscomp.RemoveUnusedPrototypePropertiesTest, com.google.javascript.jscomp.RemoveUnusedPrototypePropertiesTest, com.google.javascript.jscomp.RemoveUnusedVarsTest, com.google.javascript.jscomp.RemoveUnusedVarsTest, com.google.javascript.jscomp.RenameLabelsTest, com.google.javascript.jscomp.RenameLabelsTest, com.google.javascript.jscomp.RenameLocalVarsTest, com.google.javascript.jscomp.RenameLocalVarsTest, com.google.javascript.jscomp.RenamePropertiesTest, com.google.javascript.jscomp.RenamePropertiesTest, com.google.javascript.jscomp.RenamePrototypesTest, com.google.javascript.jscomp.RenamePrototypesTest, com.google.javascript.jscomp.RenameVarsTest, com.google.javascript.jscomp.RenameVarsTest, com.google.javascript.jscomp.ReorderConstantExpressionTest, com.google.javascript.jscomp.ReorderConstantExpressionTest, com.google.javascript.jscomp.ReplaceCssNamesTest, com.google.javascript.jscomp.ReplaceCssNamesTest, com.google.javascript.jscomp.ReplaceIdGeneratorsTest, com.google.javascript.jscomp.ReplaceIdGeneratorsTest, com.google.javascript.jscomp.ReplaceMessagesTest, com.google.javascript.jscomp.ReplaceMessagesTest, com.google.javascript.jscomp.ReplaceStringsTest, com.google.javascript.jscomp.ReplaceStringsTest, com.google.javascript.jscomp.RhinoErrorReporterTest, com.google.javascript.jscomp.RhinoErrorReporterTest, com.google.javascript.jscomp.RuntimeTypeCheckTest, com.google.javascript.jscomp.RuntimeTypeCheckTest, com.google.javascript.jscomp.SanityCheckTest, com.google.javascript.jscomp.SanityCheckTest, com.google.javascript.jscomp.ScopedAliasesTest, com.google.javascript.jscomp.ScopedAliasesTest, com.google.javascript.jscomp.SemanticReverseAbstractInterpreterTest, com.google.javascript.jscomp.SemanticReverseAbstractInterpreterTest, com.google.javascript.jscomp.ShadowVariablesTest, com.google.javascript.jscomp.ShadowVariablesTest, com.google.javascript.jscomp.SideEffectsAnalysisTest, com.google.javascript.jscomp.SideEffectsAnalysisTest, com.google.javascript.jscomp.SimpleDefinitionFinderTest, com.google.javascript.jscomp.SimpleDefinitionFinderTest, com.google.javascript.jscomp.SimpleFunctionAliasAnalysisTest, com.google.javascript.jscomp.SimpleFunctionAliasAnalysisTest, com.google.javascript.jscomp.SourceInformationAnnotatorTest, com.google.javascript.jscomp.SourceInformationAnnotatorTest, com.google.javascript.jscomp.SourceMapTest, com.google.javascript.jscomp.SourceMapTest, com.google.javascript.jscomp.SpecializeModuleTest, com.google.javascript.jscomp.SpecializeModuleTest, com.google.javascript.jscomp.StatementFusionTest, com.google.javascript.jscomp.StatementFusionTest, com.google.javascript.jscomp.StrictModeCheckTest, com.google.javascript.jscomp.StrictModeCheckTest, com.google.javascript.jscomp.StripCodeTest, com.google.javascript.jscomp.StripCodeTest, com.google.javascript.jscomp.SymbolTableTest, com.google.javascript.jscomp.SymbolTableTest, com.google.javascript.jscomp.SyntacticScopeCreatorTest, com.google.javascript.jscomp.SyntacticScopeCreatorTest, com.google.javascript.jscomp.TightenTypesTest, com.google.javascript.jscomp.TightenTypesTest, com.google.javascript.jscomp.TypeCheckFunctionCheckTest, com.google.javascript.jscomp.TypeCheckFunctionCheckTest, com.google.javascript.jscomp.TypeCheckTest, com.google.javascript.jscomp.TypeCheckTest, com.google.javascript.jscomp.TypeInferenceTest, com.google.javascript.jscomp.TypeInferenceTest, com.google.javascript.jscomp.TypeValidatorTest, com.google.javascript.jscomp.TypeValidatorTest, com.google.javascript.jscomp.TypedScopeCreatorTest, com.google.javascript.jscomp.TypedScopeCreatorTest, com.google.javascript.jscomp.UnfoldCompoundAssignmentsTest, com.google.javascript.jscomp.UnfoldCompoundAssignmentsTest, com.google.javascript.jscomp.UnreachableCodeEliminationTest, com.google.javascript.jscomp.UnreachableCodeEliminationTest, com.google.javascript.jscomp.VarCheckTest, com.google.javascript.jscomp.VarCheckTest, com.google.javascript.jscomp.VariableMapTest, com.google.javascript.jscomp.VariableMapTest, com.google.javascript.jscomp.VariableReferenceCheckTest, com.google.javascript.jscomp.VariableReferenceCheckTest, com.google.javascript.jscomp.VariableShadowDeclarationCheckTest, com.google.javascript.jscomp.VariableShadowDeclarationCheckTest, com.google.javascript.jscomp.VariableVisibilityAnalysisTest, com.google.javascript.jscomp.VariableVisibilityAnalysisTest, com.google.javascript.jscomp.XtbMessageBundleTest, com.google.javascript.jscomp.XtbMessageBundleTest, com.google.javascript.jscomp.deps.DepsFileParserTest, com.google.javascript.jscomp.deps.DepsFileParserTest, com.google.javascript.jscomp.deps.JsFileLineParserTest, com.google.javascript.jscomp.deps.JsFileLineParserTest, com.google.javascript.jscomp.deps.JsFileParserTest, com.google.javascript.jscomp.deps.JsFileParserTest, com.google.javascript.jscomp.deps.JsFunctionParserTest, com.google.javascript.jscomp.deps.JsFunctionParserTest, com.google.javascript.jscomp.deps.SortedDependenciesTest, com.google.javascript.jscomp.deps.SortedDependenciesTest, com.google.javascript.jscomp.graph.GraphColoringTest, com.google.javascript.jscomp.graph.GraphColoringTest, com.google.javascript.jscomp.graph.GraphPrunerTest, com.google.javascript.jscomp.graph.GraphPrunerTest, com.google.javascript.jscomp.graph.GraphReachabilityTest, com.google.javascript.jscomp.graph.GraphReachabilityTest, com.google.javascript.jscomp.graph.GraphTest, com.google.javascript.jscomp.graph.GraphTest, com.google.javascript.jscomp.graph.StandardUnionFindTest, com.google.javascript.jscomp.graph.StandardUnionFindTest, com.google.javascript.jscomp.jsonml.JsonMLConversionTest, com.google.javascript.jscomp.jsonml.JsonMLConversionTest, com.google.javascript.jscomp.jsonml.JsonMLValidationTest, com.google.javascript.jscomp.jsonml.JsonMLValidationTest, com.google.javascript.jscomp.jsonml.SecureCompilerTest, com.google.javascript.jscomp.jsonml.SecureCompilerTest, com.google.javascript.jscomp.parsing.IRFactoryTest, com.google.javascript.jscomp.parsing.IRFactoryTest, com.google.javascript.jscomp.parsing.JsDocInfoParserTest, com.google.javascript.jscomp.parsing.JsDocInfoParserTest, com.google.javascript.jscomp.parsing.JsDocTokenStreamTest, com.google.javascript.jscomp.parsing.JsDocTokenStreamTest, com.google.javascript.jscomp.parsing.ParserTest, com.google.javascript.jscomp.parsing.ParserTest, com.google.javascript.jscomp.regex.CharRangesTest, com.google.javascript.jscomp.regex.CharRangesTest, com.google.javascript.rhino.JSDocInfoTest, com.google.javascript.rhino.JSDocInfoTest, com.google.javascript.rhino.NodeTest, com.google.javascript.rhino.NodeTest, com.google.javascript.rhino.ParserTest, com.google.javascript.rhino.ParserTest, com.google.javascript.rhino.TokenStreamTest, com.google.javascript.rhino.TokenStreamTest, com.google.javascript.rhino.jstype.BooleanLiteralSetTest, com.google.javascript.rhino.jstype.BooleanLiteralSetTest, com.google.javascript.rhino.jstype.EnumElementTypeTest, com.google.javascript.rhino.jstype.EnumElementTypeTest, com.google.javascript.rhino.jstype.FunctionParamBuilderTest, com.google.javascript.rhino.jstype.FunctionParamBuilderTest, com.google.javascript.rhino.jstype.FunctionTypeTest, com.google.javascript.rhino.jstype.FunctionTypeTest, com.google.javascript.rhino.jstype.JSTypeRegistryTest, com.google.javascript.rhino.jstype.JSTypeRegistryTest, com.google.javascript.rhino.jstype.JSTypeTest, com.google.javascript.rhino.jstype.JSTypeTest, com.google.javascript.rhino.jstype.NamedTypeTest, com.google.javascript.rhino.jstype.NamedTypeTest, com.google.javascript.rhino.jstype.PrototypeObjectTypeTest, com.google.javascript.rhino.jstype.PrototypeObjectTypeTest, com.google.javascript.rhino.jstype.RecordTypeTest, com.google.javascript.rhino.jstype.RecordTypeTest, com.google.javascript.rhino.jstype.TernaryValueTest, com.google.javascript.rhino.jstype.TernaryValueTest, com.google.javascript.rhino.jstype.UnionTypeBuilderTest, com.google.javascript.rhino.jstype.UnionTypeBuilderTest, com.google.javascript.rhino.jstype.UnionTypeTest, com.google.javascript.rhino.jstype.UnionTypeTest], complianceLevel=6, outputFolder=., json=true} 20:19:27.972 [main] INFO fr.inria.lille.repair.nopol.NoPol - Available processors (cores): 24 20:19:27.978 [main] INFO fr.inria.lille.repair.nopol.NoPol - Free memory: 392 MB 20:19:27.979 [main] INFO fr.inria.lille.repair.nopol.NoPol - Maximum memory: 3 GB 20:19:27.979 [main] INFO fr.inria.lille.repair.nopol.NoPol - Total memory available to JVM: 483 MB 20:19:27.979 [main] INFO fr.inria.lille.repair.nopol.NoPol - Java version: 1.8.0_181 20:19:27.980 [main] INFO fr.inria.lille.repair.nopol.NoPol - JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/ 20:19:27.980 [main] INFO fr.inria.lille.repair.nopol.NoPol - PATH: /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/:/usr/lib/oar/oardodo:/usr/lib/oar/oardodo:/usr/local/bin:/usr/bin:/bin:/usr/games 20:20:59.485 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - statement #1 20:20:59.486 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - Analysing SourceLocation com.google.javascript.rhino.Token:321 which is executed by 2 tests 80988634 20:20:59.937 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - statement #2 20:20:59.937 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - Analysing SourceLocation com.google.javascript.rhino.Token:282 which is executed by 2 tests 80988634 20:21:00.154 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - statement #3 20:21:00.154 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - Analysing SourceLocation com.google.javascript.rhino.Node:1609 which is executed by 4 tests 2433571 20:21:00.473 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - looking with class fr.inria.lille.repair.nopol.spoon.smt.ConditionalAdder junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:01.123 [pool-4-thread-1] INFO xxl.java.junit.TestCasesListener - Tests run finished (595 ms) <> Total tests run: 36 <> Ignored tests: 0 <> Failed tests: 4 ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:03.895 [pool-5-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (231 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:03.917 [pool-6-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (19 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:03.930 [pool-7-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (10 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:03.944 [pool-8-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (11 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:03.946 [pool-3-thread-1] DEBUG tests.output - Failing tests with false: [testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest): Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] , testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest): Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] 20:21:03.946 [pool-3-thread-1] DEBUG tests.output - Failing tests with true: [testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest): Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] , testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest): Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] 20:21:03.947 [pool-3-thread-1] INFO f.i.l.r.n.synth.SMTNopolSynthesizer - Not enough specifications: 0. A trivial patch is "true" or "false", please write new tests specifying SourceLocation com.google.javascript.rhino.Node:1609. 20:21:03.947 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - statement #4 20:21:03.948 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - Analysing SourceLocation com.google.javascript.rhino.Node:1567 which is executed by 4 tests 2433571 20:21:04.316 [pool-2-thread-1] DEBUG fr.inria.lille.repair.nopol.NoPol - looking with class fr.inria.lille.repair.nopol.spoon.smt.ConditionalAdder junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:07.489 [pool-10-thread-1] INFO xxl.java.junit.TestCasesListener - Tests run finished (3149 ms) <> Total tests run: 36 <> Ignored tests: 0 <> Failed tests: 4 ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:09.101 [pool-11-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (238 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 20:21:09.122 [pool-12-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (17 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:09.138 [pool-13-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (14 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:09.155 [pool-14-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (14 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:09.181 [pool-15-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (20 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 20:21:09.194 [pool-16-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (10 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 20:21:09.205 [pool-17-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (9 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:55) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNotNull(Assert.java:256) at junit.framework.Assert.assertNotNull(Assert.java:248) at junit.framework.TestCase.assertNotNull(TestCase.java:417) at com.google.javascript.rhino.NodeTest.testCheckTreeEqualsStringDifferent(NodeTest.java:105) 20:21:09.209 [pool-18-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (0 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testCheckTreeEqualsStringDifferent(com.google.javascript.rhino.NodeTest) [null] junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:55) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNotNull(Assert.java:256) at junit.framework.Assert.assertNotNull(Assert.java:248) at junit.framework.TestCase.assertNotNull(TestCase.java:417) at com.google.javascript.rhino.NodeTest.testCheckTreeEqualsStringDifferent(NodeTest.java:105) 20:21:09.217 [pool-19-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (5 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:09.232 [pool-20-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (11 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testTwoMethods(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(1);Foo.prototype.callBaz=JSCompiler_stubMethod(0);Foo.prototype.baz=JSCompiler_unstubMethod(1,function(){}); Foo.prototype.callBaz=JSCompiler_unstubMethod(0,function(){this.baz()});(new Foo).callBaz() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.baz=JSCompiler_stubMethod(0);Foo.prototype.callBaz=JSCompiler_stubMethod(1); Foo.prototype.callBaz=JSCompiler_unstubMethod(1,function(){this.baz()});Foo.prototype.baz=JSCompiler_unstubMethod(0,function(){});(new Foo).callBaz() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING baz 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 1.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING callBaz 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING baz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 0.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] THIS 1 [source_file: expected2] STRING baz 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NEW 1 [parenthesized: true] [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING callBaz 1 [source_file: expected2] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_stubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i1] ASSIGN 1 [source_file: i1] GETPROP 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME Foo 1 [source_file: i1] STRING prototype 1 [source_file: i1] STRING callBaz 1 [source_file: i1] CALL 1 [free_call: 1] [source_file: i1] NAME JSCompiler_unstubMethod 1 [source_file: i1] NUMBER 1.0 1 [source_file: i1] FUNCTION 1 [source_file: i1] NAME 1 [source_file: i1] LP 1 [source_file: i1] BLOCK 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] THIS 1 [source_file: i1] STRING baz 1 [source_file: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING baz 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NEW 1 [parenthesized: true] [source_file: i2] NAME Foo 1 [source_file: i2] STRING callBaz 1 [source_file: i2] Subtree1: NUMBER 1.0 1 [source_file: expected0] Subtree2: NUMBER 0.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:09.244 [pool-21-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (10 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 1 ~ testClosureVariableReads3(com.google.javascript.jscomp.CrossModuleMethodMotionTest) [ Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] ] junit.framework.AssertionFailedError: Expected: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(0);Foo.prototype.b1=JSCompiler_unstubMethod(0,function(){Foo.prototype.b2=JSCompiler_stubMethod(1)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(1,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Result: var JSCompiler_stubMap=[];function JSCompiler_stubMethod(JSCompiler_stubMethod_id){return function(){return JSCompiler_stubMap[JSCompiler_stubMethod_id].apply(this,arguments)}}function JSCompiler_unstubMethod(JSCompiler_unstubMethod_id,JSCompiler_unstubMethod_body){return JSCompiler_stubMap[JSCompiler_unstubMethod_id]=JSCompiler_unstubMethod_body}function Foo(){}Foo.prototype.b1=JSCompiler_stubMethod(1);Foo.prototype.b1=JSCompiler_unstubMethod(1,function(){Foo.prototype.b2=JSCompiler_stubMethod(0)}); var y=new Foo;y.b1();Foo.prototype.b2=JSCompiler_unstubMethod(0,function(){var x=1;Foo.prototype.b3=function(){x}});y=new Foo;z.b2();y=new Foo;z.b3() Node tree inequality: Tree1: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: expected0] [input_id: InputId: expected0] VAR 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] ARRAYLIT 1 [source_file: expected0] FUNCTION JSCompiler_stubMethod 1 [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] FUNCTION 1 [source_file: expected0] NAME 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] CALL 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_stubMethod_id 1 [source_file: expected0] STRING apply 1 [source_file: expected0] THIS 1 [source_file: expected0] NAME arguments 1 [source_file: expected0] FUNCTION JSCompiler_unstubMethod 1 [source_file: expected0] NAME JSCompiler_unstubMethod 1 [source_file: expected0] LP 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] BLOCK 1 [source_file: expected0] RETURN 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETELEM 1 [source_file: expected0] NAME JSCompiler_stubMap 1 [source_file: expected0] NAME JSCompiler_unstubMethod_id 1 [source_file: expected0] NAME JSCompiler_unstubMethod_body 1 [source_file: expected0] FUNCTION Foo 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] LP 1 [source_file: expected0] BLOCK 1 [source_file: expected0] EXPR_RESULT 1 [source_file: expected0] ASSIGN 1 [source_file: expected0] GETPROP 1 [source_file: expected0] GETPROP 1 [source_file: expected0] NAME Foo 1 [source_file: expected0] STRING prototype 1 [source_file: expected0] STRING b1 1 [source_file: expected0] CALL 1 [free_call: 1] [source_file: expected0] NAME JSCompiler_stubMethod 1 [source_file: expected0] NUMBER 0.0 1 [source_file: expected0] SCRIPT 1 [synthetic: 1] [source_file: expected1] [input_id: InputId: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b1 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_unstubMethod 1 [source_file: expected1] NUMBER 0.0 1 [source_file: expected1] FUNCTION 1 [source_file: expected1] NAME 1 [source_file: expected1] LP 1 [source_file: expected1] BLOCK 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] ASSIGN 1 [source_file: expected1] GETPROP 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] STRING prototype 1 [source_file: expected1] STRING b2 1 [source_file: expected1] CALL 1 [free_call: 1] [source_file: expected1] NAME JSCompiler_stubMethod 1 [source_file: expected1] NUMBER 1.0 1 [source_file: expected1] VAR 1 [source_file: expected1] NAME y 1 [source_file: expected1] NEW 1 [source_file: expected1] NAME Foo 1 [source_file: expected1] EXPR_RESULT 1 [source_file: expected1] CALL 1 [source_file: expected1] GETPROP 1 [source_file: expected1] NAME y 1 [source_file: expected1] STRING b1 1 [source_file: expected1] SCRIPT 1 [synthetic: 1] [source_file: expected2] [input_id: InputId: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b2 1 [source_file: expected2] CALL 1 [free_call: 1] [source_file: expected2] NAME JSCompiler_unstubMethod 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] VAR 1 [source_file: expected2] NAME x 1 [source_file: expected2] NUMBER 1.0 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] GETPROP 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] STRING prototype 1 [source_file: expected2] STRING b3 1 [source_file: expected2] FUNCTION 1 [source_file: expected2] NAME 1 [source_file: expected2] LP 1 [source_file: expected2] BLOCK 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] NAME x 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] ASSIGN 1 [source_file: expected2] NAME y 1 [source_file: expected2] NEW 1 [source_file: expected2] NAME Foo 1 [source_file: expected2] EXPR_RESULT 1 [source_file: expected2] CALL 1 [source_file: expected2] GETPROP 1 [source_file: expected2] NAME z 1 [source_file: expected2] STRING b2 1 [source_file: expected2] SCRIPT 1 [synthetic: 1] [source_file: expected3] [input_id: InputId: expected3] EXPR_RESULT 1 [source_file: expected3] ASSIGN 1 [source_file: expected3] NAME y 1 [source_file: expected3] NEW 1 [source_file: expected3] NAME Foo 1 [source_file: expected3] EXPR_RESULT 1 [source_file: expected3] CALL 1 [source_file: expected3] GETPROP 1 [source_file: expected3] NAME z 1 [source_file: expected3] STRING b3 1 [source_file: expected3] Tree2: BLOCK [synthetic: 1] SCRIPT 1 [synthetic: 1] [source_file: i0] [input_id: InputId: i0] VAR 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] ARRAYLIT 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] FUNCTION 1 [source_file: [synthetic:1] ] NAME 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] CALL 1 [source_file: [synthetic:1] ] GETPROP 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMethod_id 1 [source_file: [synthetic:1] ] STRING apply 1 [source_file: [synthetic:1] ] THIS 1 [source_file: [synthetic:1] ] NAME arguments 1 [source_file: [synthetic:1] ] FUNCTION JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod 1 [source_file: [synthetic:1] ] LP 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] BLOCK 1 [source_file: [synthetic:1] ] RETURN 1 [source_file: [synthetic:1] ] ASSIGN 1 [source_file: [synthetic:1] ] GETELEM 1 [source_file: [synthetic:1] ] NAME JSCompiler_stubMap 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_id 1 [source_file: [synthetic:1] ] NAME JSCompiler_unstubMethod_body 1 [source_file: [synthetic:1] ] FUNCTION Foo 1 [source_file: i0] NAME Foo 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] SCRIPT 1 [synthetic: 1] [source_file: i1] [input_id: InputId: i1] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b1 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_stubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] VAR 1 [source_file: i1] NAME y 1 [source_file: i1] NEW 1 [source_file: i1] NAME Foo 1 [source_file: i1] EXPR_RESULT 1 [source_file: i1] CALL 1 [source_file: i1] GETPROP 1 [source_file: i1] NAME y 1 [source_file: i1] STRING b1 1 [source_file: i1] SCRIPT 1 [synthetic: 1] [source_file: i2] [input_id: InputId: i2] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b2 1 [source_file: i0] CALL 1 [free_call: 1] [source_file: i0] NAME JSCompiler_unstubMethod 1 [source_file: i0] NUMBER 0.0 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] VAR 1 [source_file: i0] NAME x 1 [source_file: i0] NUMBER 1.0 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] ASSIGN 1 [source_file: i0] GETPROP 1 [source_file: i0] GETPROP 1 [source_file: i0] NAME Foo 1 [source_file: i0] STRING prototype 1 [source_file: i0] STRING b3 1 [source_file: i0] FUNCTION 1 [source_file: i0] NAME 1 [source_file: i0] LP 1 [source_file: i0] BLOCK 1 [source_file: i0] EXPR_RESULT 1 [source_file: i0] NAME x 1 [source_file: i0] EXPR_RESULT 1 [source_file: i2] ASSIGN 1 [source_file: i2] NAME y 1 [source_file: i2] NEW 1 [source_file: i2] NAME Foo 1 [source_file: i2] EXPR_RESULT 1 [source_file: i2] CALL 1 [source_file: i2] GETPROP 1 [source_file: i2] NAME z 1 [source_file: i2] STRING b2 1 [source_file: i2] SCRIPT 1 [synthetic: 1] [source_file: i3] [input_id: InputId: i3] EXPR_RESULT 1 [source_file: i3] ASSIGN 1 [source_file: i3] NAME y 1 [source_file: i3] NEW 1 [source_file: i3] NAME Foo 1 [source_file: i3] EXPR_RESULT 1 [source_file: i3] CALL 1 [source_file: i3] GETPROP 1 [source_file: i3] NAME z 1 [source_file: i3] STRING b3 1 [source_file: i3] Subtree1: NUMBER 0.0 1 [source_file: expected0] Subtree2: NUMBER 1.0 1 [source_file: i0] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNull(Assert.java:277) at junit.framework.TestCase.assertNull(TestCase.java:447) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:862) at com.google.javascript.jscomp.CompilerTestCase.test(CompilerTestCase.java:692) 20:21:09.247 [pool-22-thread-1] INFO f.i.l.r.n.s.ConstraintModelBuilder$1PassingListener - Tests run finished (0 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 20:21:09.249 [pool-23-thread-1] INFO f.i.l.c.t.SpecificationTestCasesListener - Tests run finished (0 ms) <> Total tests run: 1 <> Ignored tests: 0 <> Failed tests: 0 20:21:09.758 [pool-9-thread-1] DEBUG f.i.l.c.s.ConstraintBasedSynthesis - Operators: 20:21:09.886 [pool-9-thread-1] DEBUG f.i.l.c.s.ConstraintBasedSynthesis - Operators: == of arity: 2 != of arity: 2 < of arity: 2 <= of arity: 2 20:21:10.267 [pool-9-thread-1] DEBUG f.i.l.c.s.ConstraintBasedSynthesis - Successful code synthesis: (node2.type) != (com.google.javascript.rhino.Node.this.type) 20:21:10.268 [pool-9-thread-1] INFO f.i.l.repair.nopol.patch.TestPatch - Applying patch: com.google.javascript.rhino.Node:1567: PRECONDITION (node2.type) != (com.google.javascript.rhino.Node.this.type) 20:21:11.315 [pool-9-thread-1] INFO f.i.l.repair.nopol.patch.TestPatch - Running test suite to check the patch "(node2.type) != (com.google.javascript.rhino.Node.this.type)" is working 20:21:11.597 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - ----INFORMATION---- 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb classes : 407 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb methods : 4686 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb Statements Analyzed : 2 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb Statements with Angelic Value Found : 1 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb inputs in SMT : 2 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb SMT level: 2 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb SMT components: [4] [== of arity: 2, != of arity: 2, < of arity: 2, <= of arity: 2] 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - class java.lang.Boolean: 4 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb variables in SMT : 171 20:21:11.934 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - NoPol Execution time : 103644ms 20:21:11.935 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - 20:21:11.935 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - ----PATCH FOUND---- 20:21:11.935 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - (node2.type) != (com.google.javascript.rhino.Node.this.type) 20:21:14.565 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - Nb test that executes the patch: 4 20:21:14.566 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - com.google.javascript.rhino.Node:1567: PRECONDITION 20:21:14.635 [pool-2-thread-1] INFO fr.inria.lille.repair.nopol.NoPol - --- a/src/com/google/javascript/rhino/Node.java +++ b/src/com/google/javascript/rhino/Node.java @@ -1566,7 +1566,9 @@ if (diff != null) { - return "Node tree inequality:" + - "\nTree1:\n" + toStringTree() + - "\n\nTree2:\n" + node2.toStringTree() + - "\n\nSubtree1: " + diff.nodeA.toStringTree() + - "\n\nSubtree2: " + diff.nodeB.toStringTree(); + if ((node2.type) != (com.google.javascript.rhino.Node.this.type)) { + return "Node tree inequality:" + + "\nTree1:\n" + toStringTree() + + "\n\nTree2:\n" + node2.toStringTree() + + "\n\nSubtree1: " + diff.nodeA.toStringTree() + + "\n\nSubtree2: " + diff.nodeB.toStringTree(); + } } PATCH 563.24user 10.61system 1:52.86elapsed 508%CPU (0avgtext+0avgdata 4412352maxresident)k 70160inputs+8512outputs (24major+1833273minor)pagefaults 0swaps Node: petitprince-9.luxembourg.grid5000.fr Date: Wed Nov 28 20:21:19 EST 2018