1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 19:55:34 +03:00

Merge pull request from github/follow-ruby-grammar-updates

Track latest ruby grammar changes
This commit is contained in:
Timothy Clem 2016-12-07 12:12:25 -08:00 committed by GitHub
commit 093bb62904
41 changed files with 1623 additions and 918 deletions

View File

@ -122,8 +122,8 @@ data Category
| Interpolation
-- | A subshell command (e.g. `ls -la` in Ruby)
| Subshell
-- | A conditional assignment expression.
| ConditionalAssignment
-- | Operator assignment, e.g. a ||= b, a += 1 in Ruby.
| OperatorAssignment
-- | A yield statement.
| Yield
-- | An until expression.
@ -163,6 +163,14 @@ data Category
| Break
-- | A continue statement, e.g. continue; in JavaScript.
| Continue
-- | A binary statement, e.g. a | b in Ruby.
| Binary
-- | A unary statement, e.g. !a in Ruby.
| Unary
-- | A constant, e.g `Foo::Bar` in Ruby.
| Constant
-- | A superclass, e.g `< Foo` in Ruby.
| Superclass
deriving (Eq, Generic, Ord, Show)
-- Instances
@ -222,7 +230,7 @@ instance Arbitrary Category where
, pure Export
, pure Interpolation
, pure Subshell
, pure ConditionalAssignment
, pure OperatorAssignment
, pure Yield
, pure Until
, pure Unless
@ -250,6 +258,10 @@ instance Arbitrary Category where
, pure BlockParameter
, pure Break
, pure Continue
, pure Binary
, pure Unary
, pure Constant
, pure Superclass
, Other <$> arbitrary
]

View File

@ -45,7 +45,7 @@ identifiable term = isIdentifiable (unwrap term) term
S.MethodCall{} -> Identifiable
S.Function{} -> Identifiable
S.Assignment{} -> Identifiable
S.MathAssignment{} -> Identifiable
S.OperatorAssignment{} -> Identifiable
S.VarAssignment{} -> Identifiable
S.SubscriptAccess{} -> Identifiable
S.Module{} -> Identifiable
@ -59,7 +59,6 @@ identifiable term = isIdentifiable (unwrap term) term
S.If{} -> Identifiable
S.Try{} -> Identifiable
S.Switch{} -> Identifiable
S.Case{} -> Identifiable
S.Rescue{} -> Identifiable
S.Pair{} -> Identifiable
_ -> Unidentifiable
@ -228,7 +227,7 @@ toTermName source term = case unwrap term of
S.Case expr _ -> termNameFromSource expr
S.Switch expr _ -> toTermName' expr
S.Ternary expr _ -> toTermName' expr
S.MathAssignment id _ -> toTermName' id
S.OperatorAssignment id _ -> toTermName' id
S.Operator _ -> termNameFromSource term
S.Object kvs -> "{ " <> intercalate ", " (toTermName' <$> kvs) <> " }"
S.Pair k v -> toKeyName k <> toArgName v
@ -254,7 +253,6 @@ toTermName source term = case unwrap term of
S.Export Nothing expr -> "{ " <> intercalate ", " (termNameFromSource <$> expr) <> " }"
S.Export (Just identifier) [] -> "{ " <> toTermName' identifier <> " }"
S.Export (Just identifier) expr -> "{ " <> intercalate ", " (termNameFromSource <$> expr) <> " }" <> " from " <> toTermName' identifier
S.ConditionalAssignment id _ -> toTermName' id
S.Negate expr -> toTermName' expr
S.Rescue args _ -> intercalate ", " $ toTermName' <$> args
S.Break expr -> toTermName' expr
@ -400,7 +398,7 @@ instance HasCategory Category where
C.AnonymousFunction -> "anonymous function"
C.Interpolation -> "interpolation"
C.Subshell -> "subshell command"
C.ConditionalAssignment -> "conditional assignment"
C.OperatorAssignment -> "operator assignment"
C.Yield -> "yield statement"
C.Until -> "until statement"
C.Unless -> "unless statement"
@ -428,6 +426,10 @@ instance HasCategory Category where
C.BlockParameter -> "parameter"
C.Break -> "break statement"
C.Continue -> "continue statement"
C.Binary -> "binary statement"
C.Unary -> "unary statement"
C.Constant -> "constant"
C.Superclass -> "superclass"
instance HasField fields Category => HasCategory (SyntaxTerm leaf fields) where
toCategoryName = toCategoryName . category . extract

View File

@ -46,9 +46,10 @@ termConstructor
-> IO SourceSpan -- ^ The span that the term occupies. This is passed in 'IO' to guarantee some access constraints & encourage its use only when needed (improving performance).
-> Text -- ^ The name of the production for this node.
-> Range -- ^ The character range that the term occupies.
-> [Term (S.Syntax Text) (Record '[Range, Category, SourceSpan])] -- ^ The child nodes of the term.
-> IO (Term (S.Syntax Text) (Record '[Range, Category, SourceSpan])) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children =
-> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ The child nodes of the term.
-> IO [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ All child nodes (included unnamed productions) of the term as 'IO'. Only use this if you need it.
-> IO (SyntaxTerm Text '[Range, Category, SourceSpan]) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children _ =
withDefaultInfo $ case (name, children) of
("ERROR", _) -> S.Error children
(_, []) -> S.Leaf (toText $ slice range source)

View File

@ -5,7 +5,6 @@ import Data.Record
import Info
import Prologue
import Source
import Syntax
import qualified Syntax as S
import Term
@ -14,9 +13,10 @@ termConstructor
-> IO SourceSpan -- ^ The span that the term occupies. This is passed in 'IO' to guarantee some access constraints & encourage its use only when needed (improving performance).
-> Text -- ^ The name of the production for this node.
-> Range -- ^ The character range that the term occupies.
-> [Term (Syntax Text) (Record '[Range, Category, SourceSpan])] -- ^ The child nodes of the term.
-> IO (Term (Syntax Text) (Record '[Range, Category, SourceSpan])) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children
-> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ The child nodes of the term.
-> IO [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ All child nodes (included unnamed productions) of the term as 'IO'. Only use this if you need it.
-> IO (SyntaxTerm Text '[Range, Category, SourceSpan]) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children _
| name == "ERROR" = withDefaultInfo (S.Error children)
| otherwise = withDefaultInfo $ case (name, children) of
(_, []) -> S.Leaf . toText $ slice range source

View File

@ -16,8 +16,9 @@ termConstructor
-> Text -- ^ The name of the production for this node.
-> Range -- ^ The character range that the term occupies.
-> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ The child nodes of the term.
-> IO [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ All child nodes (included unnamed productions) of the term as 'IO'. Only use this if you need it.
-> IO (SyntaxTerm Text '[Range, Category, SourceSpan]) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children = case name of
termConstructor source sourceSpan name range children _ = case name of
"return_statement" -> withDefaultInfo $ S.Return children
"source_file" -> case children of
packageName : rest | category (extract packageName) == Other "package_clause" ->

View File

@ -23,16 +23,20 @@ termConstructor
-> IO SourceSpan -- ^ The span that the term occupies. This is passed in 'IO' to guarantee some access constraints & encourage its use only when needed (improving performance).
-> Text -- ^ The name of the production for this node.
-> Range -- ^ The character range that the term occupies.
-> [Term (S.Syntax Text) (Record '[Range, Category, SourceSpan])] -- ^ The child nodes of the term.
-> IO (Term (S.Syntax Text) (Record '[Range, Category, SourceSpan])) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children
-> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ The child nodes of the term.
-> IO [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ All child nodes (included unnamed productions) of the term as 'IO'. Only use this if you need it.
-> IO (SyntaxTerm Text '[Range, Category, SourceSpan]) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children allChildren
| name == "ERROR" = withDefaultInfo (S.Error children)
| name `elem` operators = do
allChildren' <- allChildren
withDefaultInfo $ S.Operator allChildren'
| otherwise = withDefaultInfo $ case (name, children) of
("return_statement", _) -> S.Return children
("trailing_return_statement", _) -> S.Return children
("assignment", [ identifier, value ]) -> S.Assignment identifier value
("assignment", _ ) -> S.Error children
("math_assignment", [ identifier, value ]) -> S.MathAssignment identifier value
("math_assignment", [ identifier, value ]) -> S.OperatorAssignment identifier value
("math_assignment", _ ) -> S.Error children
("member_access", [ base, property ]) -> S.MemberAccess base property
("member_access", _ ) -> S.Error children
@ -107,7 +111,6 @@ termConstructor source sourceSpan name range children
_ | name `elem` forStatements -> case unsnoc children of
Just (exprs, body) -> S.For exprs [body]
_ -> S.Error children
_ | name `elem` operators -> S.Operator children
_ | name `elem` functions -> case children of
[ body ] -> S.AnonymousFunction [] [body]
[ params, body ] -> S.AnonymousFunction (toList (unwrap params)) [body]

View File

@ -10,20 +10,15 @@ import Language
import qualified Syntax as S
import Term
operators :: [Text]
operators = [ "and", "boolean_and", "or", "boolean_or", "bitwise_or", "bitwise_and", "shift", "relational", "comparison" ]
functions :: [Text]
functions = [ "lambda_literal", "lambda_expression" ]
termConstructor
:: Source Char -- ^ The source that the term occurs within.
-> IO SourceSpan -- ^ The span that the term occupies. This is passed in 'IO' to guarantee some access constraints & encourage its use only when needed (improving performance).
-> Text -- ^ The name of the production for this node.
-> Range -- ^ The character range that the term occupies.
-> [Term (S.Syntax Text) (Record '[Range, Category, SourceSpan])] -- ^ The child nodes of the term.
-> IO (Term (S.Syntax Text) (Record '[Range, Category, SourceSpan])) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children
-> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ The child nodes of the term.
-> IO [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ All child nodes (included unnamed productions) of the term as 'IO'. Only use this if you need it.
-> IO (SyntaxTerm Text '[Range, Category, SourceSpan]) -- ^ The resulting term, in IO.
termConstructor source sourceSpan name range children allChildren
| name == "ERROR" = withDefaultInfo (S.Error children)
| name == "unless_modifier" = case children of
[ lhs, rhs ] -> do
@ -45,6 +40,9 @@ termConstructor source sourceSpan name range children
condition <- withRecord (setCategory (extract expr) Negate) (S.Negate expr)
withDefaultInfo $ S.While condition rest
_ -> withDefaultInfo $ S.Error children
| name `elem` ["binary", "unary"] = do
allChildren' <- allChildren
withDefaultInfo $ S.Operator allChildren'
| otherwise = withDefaultInfo $ case (name, children) of
("argument_pair", [ k, v ] ) -> S.Pair k v
("argument_pair", _ ) -> S.Error children
@ -73,20 +71,24 @@ termConstructor source sourceSpan name range children
("case", _ ) -> S.Error children
("when", condition : body ) -> S.Case condition body
("when", _ ) -> S.Error children
("class", [ identifier, superclass, definitions ]) -> S.Class identifier (Just superclass) (toList (unwrap definitions))
("class", [ identifier, definitions ]) -> S.Class identifier Nothing (toList (unwrap definitions))
("class", constant : rest ) -> case rest of
( superclass : body ) | Superclass <- category (extract superclass) -> S.Class constant (Just superclass) body
_ -> S.Class constant Nothing rest
("class", _ ) -> S.Error children
("comment", _ ) -> S.Comment . toText $ slice range source
("conditional_assignment", [ identifier, value ]) -> S.ConditionalAssignment identifier value
("conditional_assignment", _ ) -> S.Error children
("conditional", condition : cases) -> S.Ternary condition cases
("conditional", _ ) -> S.Error children
("constant", _ ) -> S.Fixed children
("method_call", _ ) -> case children of
member : args | MemberAccess <- category (extract member) -> case toList (unwrap member) of
[target, method] -> S.MethodCall target method (toList . unwrap =<< args)
_ -> S.Error children
function : args -> S.FunctionCall function (toList . unwrap =<< args)
_ -> S.Error children
("lambda", _) -> case children of
[ body ] -> S.AnonymousFunction [] [body]
( params : body ) -> S.AnonymousFunction (toList (unwrap params)) body
_ -> S.Error children
("hash", _ ) -> S.Object $ foldMap toTuple children
("if_modifier", [ lhs, condition ]) -> S.If condition [lhs]
("if_modifier", _ ) -> S.Error children
@ -98,22 +100,22 @@ termConstructor source sourceSpan name range children
("element_reference", _ ) -> S.Error children
("for", lhs : expr : rest ) -> S.For [lhs, expr] rest
("for", _ ) -> S.Error children
("math_assignment", [ identifier, value ]) -> S.MathAssignment identifier value
("math_assignment", _ ) -> S.Error children
("member_access", [ base, property ]) -> S.MemberAccess base property
("member_access", _ ) -> S.Error children
("operator_assignment", [ identifier, value ]) -> S.OperatorAssignment identifier value
("operator_assignment", _ ) -> S.Error children
("call", [ base, property ]) -> S.MemberAccess base property
("call", _ ) -> S.Error children
("method", _ ) -> case children of
identifier : params : body | Params <- category (extract params) -> S.Method identifier (toList (unwrap params)) body
identifier : body -> S.Method identifier [] body
_ -> S.Error children
("module", identifier : body ) -> S.Module identifier body
("module", constant : body ) -> S.Module constant body
("module", _ ) -> S.Error children
("rescue", _ ) -> case children of
args : lastException : rest
| RescueArgs <- category (extract args)
, RescuedException <- category (extract lastException) -> S.Rescue (toList (unwrap args) <> [lastException]) rest
lastException : rest | RescuedException <- category (extract lastException) -> S.Rescue [lastException] rest
args : body | RescueArgs <- category (extract args) -> S.Rescue (toList (unwrap args)) body
exceptions : exceptionVar : rest
| RescueArgs <- category (extract exceptions)
, RescuedException <- category (extract exceptionVar) -> S.Rescue (toList (unwrap exceptions) <> [exceptionVar]) rest
exceptionVar : rest | RescuedException <- category (extract exceptionVar) -> S.Rescue [exceptionVar] rest
exceptions : body | RescueArgs <- category (extract exceptions) -> S.Rescue (toList (unwrap exceptions)) body
body -> S.Rescue [] body
("rescue_modifier", [lhs, rhs] ) -> S.Rescue [lhs] [rhs]
("rescue_modifier", _ ) -> S.Error children
@ -123,11 +125,6 @@ termConstructor source sourceSpan name range children
("while", expr : rest ) -> S.While expr rest
("while", _ ) -> S.Error children
("yield", _ ) -> S.Yield children
_ | name `elem` operators -> S.Operator children
_ | name `elem` functions -> case children of
[ body ] -> S.AnonymousFunction [] [body]
( params : body ) -> S.AnonymousFunction (toList (unwrap params)) body
_ -> S.Error children
(_, []) -> S.Leaf . toText $ slice range source
_ -> S.Indexed children
where
@ -141,34 +138,31 @@ termConstructor source sourceSpan name range children
categoryForRubyName :: Text -> Category
categoryForRubyName = \case
"and" -> BooleanOperator
"argument_list" -> Args
"argument_pair" -> ArgumentPair
"array" -> ArrayLiteral
"assignment" -> Assignment
"begin" -> Begin
"bitwise_and" -> BitwiseOperator -- bitwise and, e.g &.
"bitwise_or" -> BitwiseOperator -- bitwise or, e.g. ^, |.
"binary" -> Binary
"block_parameter" -> BlockParameter
"boolean_and" -> BooleanOperator -- boolean and, e.g. &&.
"boolean_or" -> BooleanOperator -- boolean or, e.g. &&.
"boolean" -> Boolean
"call" -> MemberAccess
"case" -> Case
"class" -> Class
"comment" -> Comment
"comparison" -> RelationalOperator -- comparison operator, e.g. <, <=, >=, >.
"conditional_assignment" -> ConditionalAssignment
"conditional" -> Ternary
"constant" -> Constant
"element_reference" -> SubscriptAccess
"else" -> Else
"elsif" -> Elsif
"ensure" -> Ensure
"ERROR" -> Error
"exception_variable" -> RescuedException
"exceptions" -> RescueArgs
"false" -> Boolean
"float" -> NumberLiteral
"for" -> For
"formal_parameters" -> Params
"method_call" -> FunctionCall
"function" -> Function
"hash_splat_parameter" -> HashSplatParameter
"hash" -> Object
"identifier" -> Identifier
@ -177,26 +171,25 @@ categoryForRubyName = \case
"integer" -> IntegerLiteral
"interpolation" -> Interpolation
"keyword_parameter" -> KeywordParameter
"math_assignment" -> MathAssignment
"member_access" -> MemberAccess
"method_call" -> FunctionCall
"method" -> Method
"module" -> Module
"nil" -> Identifier
"operator_assignment" -> OperatorAssignment
"optional_parameter" -> OptionalParameter
"or" -> BooleanOperator
"program" -> Program
"regex" -> Regex
"relational" -> RelationalOperator -- relational operator, e.g. ==, !=, ===, <=>, =~, !~.
"exceptions" -> RescueArgs
"rescue" -> Rescue
"rescue_modifier" -> RescueModifier
"exception_variable" -> RescuedException
"rescue" -> Rescue
"return" -> Return
"shift" -> BitwiseOperator -- bitwise shift, e.g <<, >>.
"self" -> Identifier
"splat_parameter" -> SplatParameter
"string" -> StringLiteral
"subshell" -> Subshell
"superclass" -> Superclass
"symbol" -> SymbolLiteral
"true" -> Boolean
"unary" -> Unary
"unless_modifier" -> Unless
"unless" -> Unless
"until_modifier" -> Until

View File

@ -106,7 +106,7 @@ syntaxToTermField syntax = case syntax of
S.AnonymousFunction parameters c -> [ "parameters" .= parameters ] <> childrenFields c
S.Function identifier parameters c -> [ "identifier" .= identifier ] <> [ "parameters" .= parameters ] <> childrenFields c
S.Assignment assignmentId value -> [ "identifier" .= assignmentId ] <> [ "value" .= value ]
S.MathAssignment identifier value -> [ "identifier" .= identifier ] <> [ "value" .= value ]
S.OperatorAssignment identifier value -> [ "identifier" .= identifier ] <> [ "value" .= value ]
S.MemberAccess identifier value -> [ "identifier" .= identifier ] <> [ "value" .= value ]
S.MethodCall identifier methodIdentifier parameters -> [ "identifier" .= identifier ] <> [ "methodIdentifier" .= methodIdentifier ] <> [ "parameters" .= parameters ]
S.Operator syntaxes -> [ "operatorSyntaxes" .= syntaxes ]
@ -134,7 +134,6 @@ syntaxToTermField syntax = case syntax of
S.Module identifier definitions-> [ "identifier" .= identifier ] <> [ "definitions" .= definitions ]
S.Import identifier statements -> [ "identifier" .= identifier ] <> [ "statements" .= statements ]
S.Export identifier statements -> [ "identifier" .= identifier ] <> [ "statements" .= statements ]
S.ConditionalAssignment id value -> [ "conditionalIdentifier" .= id ] <> [ "value" .= value ]
S.Yield expr -> [ "yieldExpression" .= expr ]
S.Negate expr -> [ "negate" .= expr ]
S.Rescue args expressions -> [ "args" .= args ] <> childrenFields expressions

View File

@ -86,7 +86,7 @@ styleName category = "category-" <> case category of
C.AnonymousFunction -> "anonymous_function"
C.Interpolation -> "interpolation"
C.Subshell -> "subshell"
C.ConditionalAssignment -> "conditional_assignment"
C.OperatorAssignment -> "operator_assignment"
C.Yield -> "yield_statement"
C.Until -> "until"
C.Unless -> "unless_statement"
@ -114,6 +114,10 @@ styleName category = "category-" <> case category of
C.BlockParameter -> "block_param"
C.Break -> "break_statement"
C.Continue -> "continue_statement"
C.Binary -> "binary"
C.Unary -> "unary"
C.Constant -> "constant"
C.Superclass -> "superclass"
-- | Pick the class name for a split patch.
splitPatchToClassName :: SplitPatch a -> AttributeValue

View File

@ -28,8 +28,8 @@ data Syntax a f
| Function { id :: f, params :: [f], expressions :: [f] }
-- | An assignment has an identifier where f can be a member access, and the value is another syntax element (function call, leaf, etc.)
| Assignment { assignmentId :: f, value :: f }
-- | A math assignment represents expressions whose operator classifies as mathy (e.g. += or *=).
| MathAssignment { mathAssignmentId :: f, value :: f }
-- | An operator assignment represents expressions with operators like math (e.g x += 1) or conditional (e.g. x ||= 1) assignment.
| OperatorAssignment f f
-- | A member access contains a syntax, and another syntax that identifies a property or value in the first syntax.
-- | e.g. in Javascript x.y represents a member access syntax.
| MemberAccess { memberId :: f, property :: f }
@ -77,8 +77,6 @@ data Syntax a f
| Module { moduleId:: f, moduleBody :: [f] }
| Import f [f]
| Export (Maybe f) [f]
-- | A conditional assignment represents expressions whose operator classifies as conditional (e.g. ||= or &&=).
| ConditionalAssignment { conditionalAssignmentId :: f, value :: f }
| Yield [f]
-- | A negation of a single expression.
| Negate f

View File

@ -49,13 +49,18 @@ documentToTerm language document SourceBlob{..} = alloca $ \ root -> do
let endPos = SourcePos (1 + (fromIntegral $! ts_node_p_end_point_row node)) (1 + (fromIntegral $! ts_node_p_end_point_column node))
let sourceSpan = SourceSpan { spanStart = startPos , spanEnd = endPos }
allChildrenCount <- ts_node_p_child_count node
let allChildren = filter isNonEmpty <$> traverse (alloca . getUnnamedChild node) (take (fromIntegral allChildrenCount) [0..])
-- Note: The strict application here is semantically important.
-- Without it, we may not evaluate the range until after weve exited
-- the scope that `node` was allocated within, meaning `alloca` will
-- free it & other stack data may overwrite it.
range `seq` termConstructor source (pure $! sourceSpan) (toS name) range children
range `seq` termConstructor source (pure $! sourceSpan) (toS name) range children allChildren
getChild node n out = ts_node_p_named_child node n out >> toTerm out
{-# INLINE getChild #-}
getUnnamedChild node n out = ts_node_p_child node n out >> toTerm out
{-# INLINE getUnnamedChild #-}
termConstructor = case language of
JavaScript -> JS.termConstructor
C -> C.termConstructor

View File

@ -1,30 +0,0 @@
[{
"testCaseDescription": "javascript-boolean-operator-delete-insert-test",
"expectedResult": {
"changes": {
"boolean-operator.js": [ "Added the 'i || j' binary operator", "Deleted the 'i && j' binary operator" ]
},
"errors": {}
},
"filePaths": [
"boolean-operator.js"
],
"patch": [],
"gitDir": "test/corpus/repos/javascript",
"shas": "c57d91166c3246b8e352252024dc21de6a42f707..244097ce5a74d6275f249d5159a6a14696a1eddf"
}
,{
"testCaseDescription": "javascript-boolean-operator-replacement-test",
"expectedResult": {
"changes": {
"boolean-operator.js": [ "Added the 'i && j' binary operator", "Deleted the 'i || j' binary operator" ]
},
"errors": {}
},
"filePaths": [
"boolean-operator.js"
],
"patch": [],
"gitDir": "test/corpus/repos/javascript",
"shas": "244097ce5a74d6275f249d5159a6a14696a1eddf..0abfc815d9c5912259cfc25becb398a8f1444d40"
}]

View File

@ -1,30 +0,0 @@
[{
"testCaseDescription": "javascript-relational-operator-delete-insert-test",
"expectedResult": {
"changes": {
"relational-operator.js": [ "Added the 'x < y' relational operator","Deleted the 'x <= y' relational operator" ]
},
"errors": {}
},
"filePaths": [
"relational-operator.js"
],
"patch": [],
"gitDir": "test/corpus/repos/javascript",
"shas": "f79a619c0277b82bb45cb1510847b78ba44ea31b..1fc7441b1fb64b171cf7892e3ce25bc55e25d754"
}
,{
"testCaseDescription": "javascript-relational-operator-replacement-test",
"expectedResult": {
"changes": {
"relational-operator.js": [ "Added the 'x <= y' relational operator","Deleted the 'x < y' relational operator" ]
},
"errors": {}
},
"filePaths": [
"relational-operator.js"
],
"patch": [],
"gitDir": "test/corpus/repos/javascript",
"shas": "1fc7441b1fb64b171cf7892e3ce25bc55e25d754..e1d768da1e35b8066276dc5b5f9653442345948d"
}]

View File

@ -12,47 +12,29 @@
],
"end": [
1,
2
23
]
}
},
"summary": "Added the 'x' identifier"
"summary": "Added the 'identifier' assignment"
}
]
},
"errors": {
"multiple-assignments.rb": [
{
"span": {
"insert": {
"start": [
1,
2
],
"end": [
1,
21
]
}
},
"summary": "Added the ', y, z = 10, 20, 30' at line 1, column 2 - line 1, column 21"
}
]
}
"errors": {}
},
"filePaths": [
"multiple-assignments.rb"
],
"patch": [
"diff --git a/multiple-assignments.rb b/multiple-assignments.rb",
"index e69de29..d5c6132 100644",
"index e69de29..348cf74 100644",
"--- a/multiple-assignments.rb",
"+++ b/multiple-assignments.rb",
"@@ -0,0 +1 @@",
"+x, y, z = 10, 20, 30"
"+x, y, z = [10, 20, 30]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "3bb1c281d994cc6dc7ae3b4123ecfe7bc4e9a4ad..0e189b7286042eac7f4dc2d734ee25d7df782697"
"shas": "a966f9b2783f127617cc42cbed16e6ec570b75ad..850232b2802cc99838c38bb6884e78c8675d900d"
}
,{
"testCaseDescription": "ruby-multiple-assignments-replacement-insert-test",
@ -66,200 +48,119 @@
1,
1
],
"end": [
1,
2
]
}
},
"summary": "Added the 'x' identifier"
}
]
},
"errors": {
"multiple-assignments.rb": [
{
"span": {
"insert": {
"start": [
1,
2
],
"end": [
1,
21
]
}
},
"summary": "Added the ', y = aVariable, 40' at line 1, column 2 - line 1, column 21"
"summary": "Added the 'identifier' assignment"
},
{
"span": {
"insert": {
"start": [
2,
2
1
],
"end": [
3,
2
2,
23
]
}
},
"summary": "Added the ', y, z = 10, 20, 30\nx' at line 2, column 2 - line 3, column 2"
"summary": "Added the 'identifier' assignment"
}
]
}
},
"errors": {}
},
"filePaths": [
"multiple-assignments.rb"
],
"patch": [
"diff --git a/multiple-assignments.rb b/multiple-assignments.rb",
"index d5c6132..ffc26fa 100644",
"index 348cf74..242315a 100644",
"--- a/multiple-assignments.rb",
"+++ b/multiple-assignments.rb",
"@@ -1 +1,3 @@",
"+x, y = aVariable, 40",
"+x, y, z = 10, 20, 30",
" x, y, z = 10, 20, 30"
"+x, *y = [10, 20, 30]",
"+x, y, z = [10, 20, 30]",
" x, y, z = [10, 20, 30]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0e189b7286042eac7f4dc2d734ee25d7df782697..d067041f230f898d7c96eb355fe81f2d3773d2c6"
"shas": "850232b2802cc99838c38bb6884e78c8675d900d..2f0556416a97d736bf681a377c0a17ad20fe03a1"
}
,{
"testCaseDescription": "ruby-multiple-assignments-delete-insert-test",
"expectedResult": {
"changes": {
"multiple-assignments.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
2
]
}
},
"summary": "Deleted the 'x' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
2
]
}
},
"summary": "Added the 'x' last exception"
},
{
"span": {
"insert": {
"start": [
3,
1,
4
],
"end": [
3,
1,
5
]
}
},
"summary": "Added the 'y' identifier"
"summary": "Added the 'y' identifier in an assignment to identifier"
},
{
"span": {
"insert": {
"start": [
3,
1,
7
],
"end": [
3,
13
1,
8
]
}
},
"summary": "Added the 'z' assignment"
"summary": "Added the 'z' identifier in an assignment to identifier"
},
{
"span": {
"insert": {
"start": [
3,
15
],
"end": [
3,
17
]
}
},
"summary": "Added '20'"
},
{
"span": {
"insert": {
"start": [
3,
19
],
"end": [
3,
21
]
}
},
"summary": "Added '30'"
}
]
},
"errors": {
"multiple-assignments.rb": [
{
"span": {
"delete": {
"start": [
1,
2
5
],
"end": [
1,
21
6
]
}
},
"summary": "Deleted the ', y = aVariable, 40' at line 1, column 2 - line 1, column 21"
"summary": "Deleted the 'y' identifier in an assignment to identifier"
}
]
}
},
"errors": {}
},
"filePaths": [
"multiple-assignments.rb"
],
"patch": [
"diff --git a/multiple-assignments.rb b/multiple-assignments.rb",
"index ffc26fa..7a83199 100644",
"index 242315a..274faf2 100644",
"--- a/multiple-assignments.rb",
"+++ b/multiple-assignments.rb",
"@@ -1,3 +1,3 @@",
"-x, y = aVariable, 40",
"+x, y, z = 10, 20, 30",
" x, y, z = 10, 20, 30",
" x, y, z = 10, 20, 30"
"-x, *y = [10, 20, 30]",
"+x, y, z = [10, 20, 30]",
" x, y, z = [10, 20, 30]",
" x, y, z = [10, 20, 30]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d067041f230f898d7c96eb355fe81f2d3773d2c6..5de1631198435982d9a0a84c46169d5d6d7ea075"
"shas": "2f0556416a97d736bf681a377c0a17ad20fe03a1..4cf32e342e860dec68b496ba04ed8fca1d04a08f"
}
,{
"testCaseDescription": "ruby-multiple-assignments-replacement-test",
@ -271,129 +172,66 @@
"insert": {
"start": [
1,
1
5
],
"end": [
1,
2
6
]
}
},
"summary": "Added the 'x' identifier"
"summary": "Added the 'y' identifier in an assignment to identifier"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
2
]
}
},
"summary": "Deleted the 'x' last exception"
},
{
"span": {
"delete": {
"start": [
3,
1,
4
],
"end": [
3,
1,
5
]
}
},
"summary": "Deleted the 'y' identifier"
"summary": "Deleted the 'y' identifier in an assignment to identifier"
},
{
"span": {
"delete": {
"start": [
3,
1,
7
],
"end": [
3,
13
1,
8
]
}
},
"summary": "Deleted the 'z' assignment"
},
{
"span": {
"delete": {
"start": [
3,
15
],
"end": [
3,
17
]
}
},
"summary": "Deleted '20'"
},
{
"span": {
"delete": {
"start": [
3,
19
],
"end": [
3,
21
]
}
},
"summary": "Deleted '30'"
"summary": "Deleted the 'z' identifier in an assignment to identifier"
}
]
},
"errors": {
"multiple-assignments.rb": [
{
"span": {
"insert": {
"start": [
1,
2
],
"end": [
1,
21
]
}
},
"summary": "Added the ', y = aVariable, 40' at line 1, column 2 - line 1, column 21"
}
]
}
"errors": {}
},
"filePaths": [
"multiple-assignments.rb"
],
"patch": [
"diff --git a/multiple-assignments.rb b/multiple-assignments.rb",
"index 7a83199..ffc26fa 100644",
"index 274faf2..242315a 100644",
"--- a/multiple-assignments.rb",
"+++ b/multiple-assignments.rb",
"@@ -1,3 +1,3 @@",
"-x, y, z = 10, 20, 30",
"+x, y = aVariable, 40",
" x, y, z = 10, 20, 30",
" x, y, z = 10, 20, 30"
"-x, y, z = [10, 20, 30]",
"+x, *y = [10, 20, 30]",
" x, y, z = [10, 20, 30]",
" x, y, z = [10, 20, 30]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "5de1631198435982d9a0a84c46169d5d6d7ea075..341e71598187b95dcc7b15484bae6f11e7bf2be1"
"shas": "4cf32e342e860dec68b496ba04ed8fca1d04a08f..3d3c3f2b1d6ed385e8c69eb0de5f5db36abd1f93"
}
,{
"testCaseDescription": "ruby-multiple-assignments-delete-replacement-test",
@ -407,118 +245,103 @@
1,
1
],
"end": [
1,
2
]
}
},
"summary": "Deleted the 'x' identifier"
},
{
"span": {
"replace": [
{
"start": [
3,
2
],
"end": [
3,
21
]
},
{
"start": [
2,
2
],
"end": [
2,
21
]
}
]
},
"summary": "Replaced the ', y, z = 10, 20, 30' at line 3, column 2 - line 3, column 21 with the ', y = aVariable, 40' at line 2, column 2 - line 2, column 21"
}
]
},
"errors": {
"multiple-assignments.rb": [
{
"span": {
"delete": {
"start": [
1,
2
],
"end": [
1,
21
]
}
},
"summary": "Deleted the ', y = aVariable, 40' at line 1, column 2 - line 1, column 21"
"summary": "Deleted the 'identifier' assignment"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
23
]
}
},
"summary": "Deleted the 'identifier' assignment"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
21
]
}
},
"summary": "Added the 'identifier' assignment"
}
]
}
},
"errors": {}
},
"filePaths": [
"multiple-assignments.rb"
],
"patch": [
"diff --git a/multiple-assignments.rb b/multiple-assignments.rb",
"index ffc26fa..64eb96e 100644",
"index 242315a..7ba9487 100644",
"--- a/multiple-assignments.rb",
"+++ b/multiple-assignments.rb",
"@@ -1,3 +1,2 @@",
"-x, y = aVariable, 40",
"-x, y, z = 10, 20, 30",
" x, y, z = 10, 20, 30",
"+x, y = aVariable, 40"
"-x, *y = [10, 20, 30]",
"-x, y, z = [10, 20, 30]",
" x, y, z = [10, 20, 30]",
"+x, *y = [10, 20, 30]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "341e71598187b95dcc7b15484bae6f11e7bf2be1..a6593c018a9df2378f861b9c1ad3b9177bfa829b"
"shas": "3d3c3f2b1d6ed385e8c69eb0de5f5db36abd1f93..b724179373843cb5f953b1eb84fe3cf1f787cae1"
}
,{
"testCaseDescription": "ruby-multiple-assignments-delete-test",
"expectedResult": {
"changes": {},
"errors": {
"changes": {
"multiple-assignments.rb": [
{
"span": {
"delete": {
"start": [
1,
2
1
],
"end": [
2,
2
1,
23
]
}
},
"summary": "Deleted the ', y, z = 10, 20, 30\nx' at line 1, column 2 - line 2, column 2"
"summary": "Deleted the 'identifier' assignment"
}
]
}
},
"errors": {}
},
"filePaths": [
"multiple-assignments.rb"
],
"patch": [
"diff --git a/multiple-assignments.rb b/multiple-assignments.rb",
"index 64eb96e..9ddb504 100644",
"index 7ba9487..32cf6a2 100644",
"--- a/multiple-assignments.rb",
"+++ b/multiple-assignments.rb",
"@@ -1,2 +1 @@",
"-x, y, z = 10, 20, 30",
" x, y = aVariable, 40"
"-x, y, z = [10, 20, 30]",
" x, *y = [10, 20, 30]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a6593c018a9df2378f861b9c1ad3b9177bfa829b..062f58537be463677c5fdb1f2bdb348c6b5dc35b"
"shas": "b724179373843cb5f953b1eb84fe3cf1f787cae1..9470930d6fca5e33ec313863fbe1c443d7388dbe"
}
,{
"testCaseDescription": "ruby-multiple-assignments-delete-rest-test",
@ -532,47 +355,29 @@
1,
1
],
"end": [
1,
2
]
}
},
"summary": "Deleted the 'x' identifier"
}
]
},
"errors": {
"multiple-assignments.rb": [
{
"span": {
"delete": {
"start": [
1,
2
],
"end": [
1,
21
]
}
},
"summary": "Deleted the ', y = aVariable, 40' at line 1, column 2 - line 1, column 21"
"summary": "Deleted the 'identifier' assignment"
}
]
}
},
"errors": {}
},
"filePaths": [
"multiple-assignments.rb"
],
"patch": [
"diff --git a/multiple-assignments.rb b/multiple-assignments.rb",
"index 9ddb504..e69de29 100644",
"index 32cf6a2..e69de29 100644",
"--- a/multiple-assignments.rb",
"+++ b/multiple-assignments.rb",
"@@ -1 +0,0 @@",
"-x, y = aVariable, 40"
"-x, *y = [10, 20, 30]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "062f58537be463677c5fdb1f2bdb348c6b5dc35b..8fdba55b3908d99741224cef85bcd7bef5dfcf2f"
"shas": "9470930d6fca5e33ec313863fbe1c443d7388dbe..d4996909ad6798a66c5242d7171125ce6dbe1a50"
}]

View File

@ -27,14 +27,14 @@
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index e69de29..b592868 100644",
"index e69de29b..b5928681 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -0,0 +1 @@",
"+function(a,b) { return a + b; }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "5f4dfa791577127cebc7f5fa8c7d94b7427980f3..2e9eda4d95ac6cbdd16de3ad1464523de63ffb44"
"shas": "07a785cb4f0cfa49a60fdfbbce7d8ecbfd2a820b..1ecbe6a443a701cf2b90740825d337914c3b01b8"
}
,{
"testCaseDescription": "javascript-anonymous-function-replacement-insert-test",
@ -80,7 +80,7 @@
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index b592868..e1de356 100644",
"index b5928681..e1de356c 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1 +1,3 @@",
@ -89,7 +89,7 @@
" function(a,b) { return a + b; }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "2e9eda4d95ac6cbdd16de3ad1464523de63ffb44..d6d789dd70b74b099621405aaab5cbb25e1a47eb"
"shas": "1ecbe6a443a701cf2b90740825d337914c3b01b8..1e649afd16b0e9145c760bd152b90dbf2eeb1c79"
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-insert-test",
@ -160,7 +160,7 @@
],
"end": [
1,
25
29
]
},
{
@ -168,33 +168,6 @@
1,
24
],
"end": [
1,
25
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
28
],
"end": [
1,
29
]
},
{
"start": [
1,
28
],
"end": [
1,
29
@ -202,7 +175,7 @@
}
]
},
"summary": "Replaced the 'c' identifier with the 'b' identifier"
"summary": "Replaced the 'b * c' math operator with the 'a + b' math operator"
}
]
},
@ -213,7 +186,7 @@
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index e1de356..4ca0d4c 100644",
"index e1de356c..4ca0d4c7 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1,3 +1,3 @@",
@ -223,7 +196,7 @@
" function(a,b) { return a + b; }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "d6d789dd70b74b099621405aaab5cbb25e1a47eb..d40be86ea2ce078c6a426ce0a8c252a71892113a"
"shas": "1e649afd16b0e9145c760bd152b90dbf2eeb1c79..7fb344d8f58ce3935df46d0dc70e9f8f1896908f"
}
,{
"testCaseDescription": "javascript-anonymous-function-replacement-test",
@ -294,7 +267,7 @@
],
"end": [
1,
25
29
]
},
{
@ -302,33 +275,6 @@
1,
24
],
"end": [
1,
25
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
28
],
"end": [
1,
29
]
},
{
"start": [
1,
28
],
"end": [
1,
29
@ -336,7 +282,7 @@
}
]
},
"summary": "Replaced the 'b' identifier with the 'c' identifier"
"summary": "Replaced the 'a + b' math operator with the 'b * c' math operator"
}
]
},
@ -347,7 +293,7 @@
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index 4ca0d4c..e1de356 100644",
"index 4ca0d4c7..e1de356c 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1,3 +1,3 @@",
@ -357,7 +303,7 @@
" function(a,b) { return a + b; }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "d40be86ea2ce078c6a426ce0a8c252a71892113a..fbe8b2947cb17ec793516f3368dd2f787bccfe66"
"shas": "7fb344d8f58ce3935df46d0dc70e9f8f1896908f..6d835d52398bfc6715ef4c40d2706dd8c11cb83a"
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-replacement-test",
@ -418,7 +364,7 @@
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index e1de356..afdaccf 100644",
"index e1de356c..afdaccf7 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1,3 +1,2 @@",
@ -428,7 +374,7 @@
"+function(b,c) { return b * c; }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "fbe8b2947cb17ec793516f3368dd2f787bccfe66..260e74caf2632a2de525e1341d76ed31cc8cf2bf"
"shas": "6d835d52398bfc6715ef4c40d2706dd8c11cb83a..fa0cd2354feb5199209c9aa13525567951185c88"
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-test",
@ -459,7 +405,7 @@
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index afdaccf..9f1856f 100644",
"index afdaccf7..9f1856f5 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1,2 +1 @@",
@ -467,7 +413,7 @@
" function(b,c) { return b * c; }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "260e74caf2632a2de525e1341d76ed31cc8cf2bf..f425fbe0cbbd72279ea1a69e34baa8e341700a09"
"shas": "fa0cd2354feb5199209c9aa13525567951185c88..a93d062ea69a6600b3f795d769e2557042925d66"
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-rest-test",
@ -498,12 +444,12 @@
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index 9f1856f..e69de29 100644",
"index 9f1856f5..e69de29b 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1 +0,0 @@",
"-function(b,c) { return b * c; }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f425fbe0cbbd72279ea1a69e34baa8e341700a09..2a5f85a471c9c83f2e835139afa5eb7bfecd546a"
"shas": "a93d062ea69a6600b3f795d769e2557042925d66..80946fe6667b3843c0bd704136ac929ca5f2e3e0"
}]

View File

@ -27,14 +27,14 @@
],
"patch": [
"diff --git a/boolean-operator.js b/boolean-operator.js",
"index e69de29..7280a98 100644",
"index e69de29b..7280a98c 100644",
"--- a/boolean-operator.js",
"+++ b/boolean-operator.js",
"@@ -0,0 +1 @@",
"+i || j;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "69248e3fdb3e6ab7da864ef7bd3a915aeefd3cc4..697a361cfb8bcfd14631209deb6159679d166115"
"shas": "dcb8509973be89c9c4f7239f90bc27b29abe6886..7278cbb3e1324846d217ed8b5d96d30b1d23c9e1"
}
,{
"testCaseDescription": "javascript-boolean-operator-replacement-insert-test",
@ -80,7 +80,7 @@
],
"patch": [
"diff --git a/boolean-operator.js b/boolean-operator.js",
"index 7280a98..fe3f306 100644",
"index 7280a98c..fe3f3064 100644",
"--- a/boolean-operator.js",
"+++ b/boolean-operator.js",
"@@ -1 +1,3 @@",
@ -89,12 +89,42 @@
" i || j;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "697a361cfb8bcfd14631209deb6159679d166115..2829490ad0cdc2f954145a2698444d5daf1da199"
"shas": "7278cbb3e1324846d217ed8b5d96d30b1d23c9e1..dcbb69024b9472b7573c1284b9f2a9ba3c0bf241"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-insert-test",
"expectedResult": {
"changes": {},
"changes": {
"boolean-operator.js": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'i && j' boolean operator with the 'i || j' boolean operator"
}
]
},
"errors": {}
},
"filePaths": [
@ -102,7 +132,7 @@
],
"patch": [
"diff --git a/boolean-operator.js b/boolean-operator.js",
"index fe3f306..273c0ee 100644",
"index fe3f3064..273c0ee8 100644",
"--- a/boolean-operator.js",
"+++ b/boolean-operator.js",
"@@ -1,3 +1,3 @@",
@ -112,12 +142,42 @@
" i || j;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "2829490ad0cdc2f954145a2698444d5daf1da199..8a66944201f7ad0fc2ee8fcdcaff607125c8cc0f"
"shas": "dcbb69024b9472b7573c1284b9f2a9ba3c0bf241..1d4a46d71e3418079b81f3b494ead0ddec0770ef"
}
,{
"testCaseDescription": "javascript-boolean-operator-replacement-test",
"expectedResult": {
"changes": {},
"changes": {
"boolean-operator.js": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'i || j' boolean operator with the 'i && j' boolean operator"
}
]
},
"errors": {}
},
"filePaths": [
@ -125,7 +185,7 @@
],
"patch": [
"diff --git a/boolean-operator.js b/boolean-operator.js",
"index 273c0ee..fe3f306 100644",
"index 273c0ee8..fe3f3064 100644",
"--- a/boolean-operator.js",
"+++ b/boolean-operator.js",
"@@ -1,3 +1,3 @@",
@ -135,7 +195,7 @@
" i || j;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "8a66944201f7ad0fc2ee8fcdcaff607125c8cc0f..0658cb117a6a6719f8464948c86e3e278d8c2a95"
"shas": "1d4a46d71e3418079b81f3b494ead0ddec0770ef..59bf7426522f2e5a40fd2fbd5e9adc595c4a6f26"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-replacement-test",
@ -156,6 +216,36 @@
}
},
"summary": "Deleted the 'i && j' boolean operator"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'i || j' boolean operator"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'i && j' boolean operator"
}
]
},
@ -166,7 +256,7 @@
],
"patch": [
"diff --git a/boolean-operator.js b/boolean-operator.js",
"index fe3f306..7f4873c 100644",
"index fe3f3064..7f4873c1 100644",
"--- a/boolean-operator.js",
"+++ b/boolean-operator.js",
"@@ -1,3 +1,2 @@",
@ -176,7 +266,7 @@
"+i && j;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "0658cb117a6a6719f8464948c86e3e278d8c2a95..35f6d8f480c9f8645a3c0d8f9fa5339059a6380a"
"shas": "59bf7426522f2e5a40fd2fbd5e9adc595c4a6f26..2aff614351987457ce3a0ce900610cf622e1765e"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-test",
@ -207,7 +297,7 @@
],
"patch": [
"diff --git a/boolean-operator.js b/boolean-operator.js",
"index 7f4873c..c6921d1 100644",
"index 7f4873c1..c6921d12 100644",
"--- a/boolean-operator.js",
"+++ b/boolean-operator.js",
"@@ -1,2 +1 @@",
@ -215,7 +305,7 @@
" i && j;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "35f6d8f480c9f8645a3c0d8f9fa5339059a6380a..2b07585de8be3e4334361368f2dc465278842434"
"shas": "2aff614351987457ce3a0ce900610cf622e1765e..df4a601cd0eea4d8db63a7f7097753ae9fbd9f4b"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-rest-test",
@ -246,12 +336,12 @@
],
"patch": [
"diff --git a/boolean-operator.js b/boolean-operator.js",
"index c6921d1..e69de29 100644",
"index c6921d12..e69de29b 100644",
"--- a/boolean-operator.js",
"+++ b/boolean-operator.js",
"@@ -1 +0,0 @@",
"-i && j;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "2b07585de8be3e4334361368f2dc465278842434..5edf134e2ccb0fa1cd27b2e07b4279575f1a5f0d"
"shas": "df4a601cd0eea4d8db63a7f7097753ae9fbd9f4b..1d234a84ee270c0d6a329fcdcbc065e50bed813b"
}]

View File

@ -27,14 +27,14 @@
],
"patch": [
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
"index e69de29..7421e18 100644",
"index e69de29b..7421e188 100644",
"--- a/objects-with-methods.js",
"+++ b/objects-with-methods.js",
"@@ -0,0 +1 @@",
"+{ add(a, b) { return a + b; } };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "e66b1b20abc596d2b560eaa80f1749c79816f9ff..d3b8c609f29da1978a60c14da5d0ca5dfc565eff"
"shas": "5fe71a17cc99387501792a564bc50da57decd600..4851c63010b9106484a5f927916b5649e8e51dbd"
}
,{
"testCaseDescription": "javascript-objects-with-methods-replacement-insert-test",
@ -80,7 +80,7 @@
],
"patch": [
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
"index 7421e18..59eb3a3 100644",
"index 7421e188..59eb3a3d 100644",
"--- a/objects-with-methods.js",
"+++ b/objects-with-methods.js",
"@@ -1 +1,3 @@",
@ -89,7 +89,7 @@
" { add(a, b) { return a + b; } };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "d3b8c609f29da1978a60c14da5d0ca5dfc565eff..71f9fe548526a54588efe8ccf43fb16946dde439"
"shas": "4851c63010b9106484a5f927916b5649e8e51dbd..ff8a20b8f6098bb77aecc7af4cd21794488b4cda"
}
,{
"testCaseDescription": "javascript-objects-with-methods-delete-insert-test",
@ -122,6 +122,33 @@
]
},
"summary": "Replaced the 'subtract' identifier with the 'add' identifier in the 'add(a, b)' method"
},
{
"span": {
"replace": [
{
"start": [
1,
27
],
"end": [
1,
32
]
},
{
"start": [
1,
22
],
"end": [
1,
27
]
}
]
},
"summary": "Replaced the 'a - b' math operator with the 'a + b' math operator in the 'add(a, b)' method"
}
]
},
@ -132,7 +159,7 @@
],
"patch": [
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
"index 59eb3a3..05689b1 100644",
"index 59eb3a3d..05689b17 100644",
"--- a/objects-with-methods.js",
"+++ b/objects-with-methods.js",
"@@ -1,3 +1,3 @@",
@ -142,7 +169,7 @@
" { add(a, b) { return a + b; } };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "71f9fe548526a54588efe8ccf43fb16946dde439..3651aee8e277793117960f9223391b0cfdb1f814"
"shas": "ff8a20b8f6098bb77aecc7af4cd21794488b4cda..0eb6d26bdbee9a47efa74182c2dfb9fa3c677c0c"
}
,{
"testCaseDescription": "javascript-objects-with-methods-replacement-test",
@ -175,6 +202,33 @@
]
},
"summary": "Replaced the 'add' identifier with the 'subtract' identifier in the 'subtract(a, b)' method"
},
{
"span": {
"replace": [
{
"start": [
1,
22
],
"end": [
1,
27
]
},
{
"start": [
1,
27
],
"end": [
1,
32
]
}
]
},
"summary": "Replaced the 'a + b' math operator with the 'a - b' math operator in the 'subtract(a, b)' method"
}
]
},
@ -185,7 +239,7 @@
],
"patch": [
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
"index 05689b1..59eb3a3 100644",
"index 05689b17..59eb3a3d 100644",
"--- a/objects-with-methods.js",
"+++ b/objects-with-methods.js",
"@@ -1,3 +1,3 @@",
@ -195,7 +249,7 @@
" { add(a, b) { return a + b; } };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "3651aee8e277793117960f9223391b0cfdb1f814..af0586db52b5b97c1c819ee5e107835fa2299249"
"shas": "0eb6d26bdbee9a47efa74182c2dfb9fa3c677c0c..d799c888cbd8b3a2c5fd918488bfdced8c37e3b4"
}
,{
"testCaseDescription": "javascript-objects-with-methods-delete-replacement-test",
@ -256,7 +310,7 @@
],
"patch": [
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
"index 59eb3a3..29d3998 100644",
"index 59eb3a3d..29d39987 100644",
"--- a/objects-with-methods.js",
"+++ b/objects-with-methods.js",
"@@ -1,3 +1,2 @@",
@ -266,7 +320,7 @@
"+{ subtract(a, b) { return a - b; } };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "af0586db52b5b97c1c819ee5e107835fa2299249..a1ef0cba5455912ff148f7bf8afbc74061d8de10"
"shas": "d799c888cbd8b3a2c5fd918488bfdced8c37e3b4..95338f9afb1060c14d4181bf7fd428d43a7b9f04"
}
,{
"testCaseDescription": "javascript-objects-with-methods-delete-test",
@ -297,7 +351,7 @@
],
"patch": [
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
"index 29d3998..80ad7f0 100644",
"index 29d39987..80ad7f08 100644",
"--- a/objects-with-methods.js",
"+++ b/objects-with-methods.js",
"@@ -1,2 +1 @@",
@ -305,7 +359,7 @@
" { subtract(a, b) { return a - b; } };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "a1ef0cba5455912ff148f7bf8afbc74061d8de10..896cd9fdc71791d876ea5108de8b34631f284c5a"
"shas": "95338f9afb1060c14d4181bf7fd428d43a7b9f04..cc541912a1dea8dbd3e1f25ec14c9de7bc3ecb06"
}
,{
"testCaseDescription": "javascript-objects-with-methods-delete-rest-test",
@ -336,12 +390,12 @@
],
"patch": [
"diff --git a/objects-with-methods.js b/objects-with-methods.js",
"index 80ad7f0..e69de29 100644",
"index 80ad7f08..e69de29b 100644",
"--- a/objects-with-methods.js",
"+++ b/objects-with-methods.js",
"@@ -1 +0,0 @@",
"-{ subtract(a, b) { return a - b; } };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "896cd9fdc71791d876ea5108de8b34631f284c5a..c1ec2fd690eae01418882f3dbba8b6a5c0c3c2eb"
"shas": "cc541912a1dea8dbd3e1f25ec14c9de7bc3ecb06..07a785cb4f0cfa49a60fdfbbce7d8ecbfd2a820b"
}]

View File

@ -27,14 +27,14 @@
],
"patch": [
"diff --git a/relational-operator.js b/relational-operator.js",
"index e69de29..4021910 100644",
"index e69de29b..4021910f 100644",
"--- a/relational-operator.js",
"+++ b/relational-operator.js",
"@@ -0,0 +1 @@",
"+x < y;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "4e47562dd59646a6c6c55ab138660495394bc5c9..58bdba5f1c185ad7ae6f4275533f799aa25e9020"
"shas": "1d234a84ee270c0d6a329fcdcbc065e50bed813b..f7081b58f603918674558efe269d8dbd1ffc0835"
}
,{
"testCaseDescription": "javascript-relational-operator-replacement-insert-test",
@ -80,7 +80,7 @@
],
"patch": [
"diff --git a/relational-operator.js b/relational-operator.js",
"index 4021910..dbef050 100644",
"index 4021910f..dbef0501 100644",
"--- a/relational-operator.js",
"+++ b/relational-operator.js",
"@@ -1 +1,3 @@",
@ -89,12 +89,42 @@
" x < y;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "58bdba5f1c185ad7ae6f4275533f799aa25e9020..440204afe68655c97580bc91b578d9f4a0475c6c"
"shas": "f7081b58f603918674558efe269d8dbd1ffc0835..57f5399d4cf2022a779be84e5e9ffe8f15beca07"
}
,{
"testCaseDescription": "javascript-relational-operator-delete-insert-test",
"expectedResult": {
"changes": {},
"changes": {
"relational-operator.js": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced the 'x <= y' relational operator with the 'x < y' relational operator"
}
]
},
"errors": {}
},
"filePaths": [
@ -102,7 +132,7 @@
],
"patch": [
"diff --git a/relational-operator.js b/relational-operator.js",
"index dbef050..a9ff7f6 100644",
"index dbef0501..a9ff7f65 100644",
"--- a/relational-operator.js",
"+++ b/relational-operator.js",
"@@ -1,3 +1,3 @@",
@ -112,12 +142,42 @@
" x < y;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "440204afe68655c97580bc91b578d9f4a0475c6c..903fdf57bcf14cae9e043c4fbafb911715076dda"
"shas": "57f5399d4cf2022a779be84e5e9ffe8f15beca07..3161974cca9b971b21e69bbe11c32ece0e43e408"
}
,{
"testCaseDescription": "javascript-relational-operator-replacement-test",
"expectedResult": {
"changes": {},
"changes": {
"relational-operator.js": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
6
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'x < y' relational operator with the 'x <= y' relational operator"
}
]
},
"errors": {}
},
"filePaths": [
@ -125,7 +185,7 @@
],
"patch": [
"diff --git a/relational-operator.js b/relational-operator.js",
"index a9ff7f6..dbef050 100644",
"index a9ff7f65..dbef0501 100644",
"--- a/relational-operator.js",
"+++ b/relational-operator.js",
"@@ -1,3 +1,3 @@",
@ -135,7 +195,7 @@
" x < y;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "903fdf57bcf14cae9e043c4fbafb911715076dda..f6f1aab236022d2804b6bff6a9d5980814a5bdf1"
"shas": "3161974cca9b971b21e69bbe11c32ece0e43e408..b7a5454b7132955133e3749565ef37567cfa2d5e"
}
,{
"testCaseDescription": "javascript-relational-operator-delete-replacement-test",
@ -156,6 +216,36 @@
}
},
"summary": "Deleted the 'x <= y' relational operator"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'x < y' relational operator"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'x <= y' relational operator"
}
]
},
@ -166,7 +256,7 @@
],
"patch": [
"diff --git a/relational-operator.js b/relational-operator.js",
"index dbef050..1ee42eb 100644",
"index dbef0501..1ee42eb9 100644",
"--- a/relational-operator.js",
"+++ b/relational-operator.js",
"@@ -1,3 +1,2 @@",
@ -176,7 +266,7 @@
"+x <= y;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f6f1aab236022d2804b6bff6a9d5980814a5bdf1..55e87f9b00be4efdd35b68a61ac0c00bd6adc835"
"shas": "b7a5454b7132955133e3749565ef37567cfa2d5e..c40fd681cdd3b75acaf0826df149b0e9c13ceb4f"
}
,{
"testCaseDescription": "javascript-relational-operator-delete-test",
@ -207,7 +297,7 @@
],
"patch": [
"diff --git a/relational-operator.js b/relational-operator.js",
"index 1ee42eb..3be8450 100644",
"index 1ee42eb9..3be8450f 100644",
"--- a/relational-operator.js",
"+++ b/relational-operator.js",
"@@ -1,2 +1 @@",
@ -215,7 +305,7 @@
" x <= y;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "55e87f9b00be4efdd35b68a61ac0c00bd6adc835..436b0dd39bce7222b6173e02af06a76e64862bd3"
"shas": "c40fd681cdd3b75acaf0826df149b0e9c13ceb4f..7e0cd5e7ebf2702d445a75bb632353547258d65b"
}
,{
"testCaseDescription": "javascript-relational-operator-delete-rest-test",
@ -246,12 +336,12 @@
],
"patch": [
"diff --git a/relational-operator.js b/relational-operator.js",
"index 3be8450..e69de29 100644",
"index 3be8450f..e69de29b 100644",
"--- a/relational-operator.js",
"+++ b/relational-operator.js",
"@@ -1 +0,0 @@",
"-x <= y;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "436b0dd39bce7222b6173e02af06a76e64862bd3..eaeb10729b105d290f4091fea5f04c34030bb5a5"
"shas": "7e0cd5e7ebf2702d445a75bb632353547258d65b..8a27197df5dd32970d666dec2ed87840381ee268"
}]

View File

@ -148,7 +148,7 @@
}
]
},
"summary": "Replaced '2' with '1' in the '2' case statement"
"summary": "Replaced '2' with '1' in the '1' switch statement"
}
]
},
@ -228,7 +228,7 @@
}
]
},
"summary": "Replaced '1' with '2' in the '2' case statement"
"summary": "Replaced '1' with '2' in the '2' switch statement"
}
]
},

View File

@ -27,14 +27,14 @@
],
"patch": [
"diff --git a/type-operator.js b/type-operator.js",
"index e69de29..08d2bf5 100644",
"index e69de29b..08d2bf54 100644",
"--- a/type-operator.js",
"+++ b/type-operator.js",
"@@ -0,0 +1 @@",
"+typeof x;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "38dbecd6735244d4c2c50c6608e64fd7df72b900..408a6dcf89d854252ec12de52f008a2a88793ade"
"shas": "8a27197df5dd32970d666dec2ed87840381ee268..022b10ca6587ce508c5c19c8b4ce3eda620bb06d"
}
,{
"testCaseDescription": "javascript-type-operator-replacement-insert-test",
@ -80,7 +80,7 @@
],
"patch": [
"diff --git a/type-operator.js b/type-operator.js",
"index 08d2bf5..8b9c2f4 100644",
"index 08d2bf54..8b9c2f4a 100644",
"--- a/type-operator.js",
"+++ b/type-operator.js",
"@@ -1 +1,3 @@",
@ -89,7 +89,7 @@
" typeof x;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "408a6dcf89d854252ec12de52f008a2a88793ade..50475853b794903dd58705a2648d465fa42db1c1"
"shas": "022b10ca6587ce508c5c19c8b4ce3eda620bb06d..5d3e102e26668c0582da052a846ae6b4965f80dc"
}
,{
"testCaseDescription": "javascript-type-operator-delete-insert-test",
@ -98,18 +98,30 @@
"type-operator.js": [
{
"span": {
"delete": {
"start": [
1,
14
],
"end": [
1,
20
]
}
"replace": [
{
"start": [
1,
1
],
"end": [
1,
20
]
},
{
"start": [
1,
1
],
"end": [
1,
9
]
}
]
},
"summary": "Deleted the 'String' identifier"
"summary": "Replaced the 'x instanceof String' operator with the 'typeof x' operator"
}
]
},
@ -120,7 +132,7 @@
],
"patch": [
"diff --git a/type-operator.js b/type-operator.js",
"index 8b9c2f4..6a5be18 100644",
"index 8b9c2f4a..6a5be18c 100644",
"--- a/type-operator.js",
"+++ b/type-operator.js",
"@@ -1,3 +1,3 @@",
@ -130,7 +142,7 @@
" typeof x;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "50475853b794903dd58705a2648d465fa42db1c1..033d2812882757f8235cbbc27a1059188d125636"
"shas": "5d3e102e26668c0582da052a846ae6b4965f80dc..80ee88adb73c66f5d7f8e7ad2d462ba95656a35f"
}
,{
"testCaseDescription": "javascript-type-operator-replacement-test",
@ -139,18 +151,30 @@
"type-operator.js": [
{
"span": {
"insert": {
"start": [
1,
14
],
"end": [
1,
20
]
}
"replace": [
{
"start": [
1,
1
],
"end": [
1,
9
]
},
{
"start": [
1,
1
],
"end": [
1,
20
]
}
]
},
"summary": "Added the 'String' identifier"
"summary": "Replaced the 'typeof x' operator with the 'x instanceof String' operator"
}
]
},
@ -161,7 +185,7 @@
],
"patch": [
"diff --git a/type-operator.js b/type-operator.js",
"index 6a5be18..8b9c2f4 100644",
"index 6a5be18c..8b9c2f4a 100644",
"--- a/type-operator.js",
"+++ b/type-operator.js",
"@@ -1,3 +1,3 @@",
@ -171,7 +195,7 @@
" typeof x;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "033d2812882757f8235cbbc27a1059188d125636..a6dcc28c9ae5225546c6829efd0ff16e42357fa3"
"shas": "80ee88adb73c66f5d7f8e7ad2d462ba95656a35f..7dba6ba536a93671b81505e98ffc137d51714936"
}
,{
"testCaseDescription": "javascript-type-operator-delete-replacement-test",
@ -232,7 +256,7 @@
],
"patch": [
"diff --git a/type-operator.js b/type-operator.js",
"index 8b9c2f4..d438f9f 100644",
"index 8b9c2f4a..d438f9f3 100644",
"--- a/type-operator.js",
"+++ b/type-operator.js",
"@@ -1,3 +1,2 @@",
@ -242,7 +266,7 @@
"+x instanceof String;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "a6dcc28c9ae5225546c6829efd0ff16e42357fa3..bb1b06901faca6abda996edbee1901289e63abde"
"shas": "7dba6ba536a93671b81505e98ffc137d51714936..9426a9f8c4206d41610d24729659aabd8bb92f4d"
}
,{
"testCaseDescription": "javascript-type-operator-delete-test",
@ -273,7 +297,7 @@
],
"patch": [
"diff --git a/type-operator.js b/type-operator.js",
"index d438f9f..0bf5275 100644",
"index d438f9f3..0bf52754 100644",
"--- a/type-operator.js",
"+++ b/type-operator.js",
"@@ -1,2 +1 @@",
@ -281,7 +305,7 @@
" x instanceof String;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "bb1b06901faca6abda996edbee1901289e63abde..bc73ac8dfd8a42fc942bd8dac8012ef2e3a217da"
"shas": "9426a9f8c4206d41610d24729659aabd8bb92f4d..4dea2afbe25572aee977123753ff00348123b34d"
}
,{
"testCaseDescription": "javascript-type-operator-delete-rest-test",
@ -312,12 +336,12 @@
],
"patch": [
"diff --git a/type-operator.js b/type-operator.js",
"index 0bf5275..e69de29 100644",
"index 0bf52754..e69de29b 100644",
"--- a/type-operator.js",
"+++ b/type-operator.js",
"@@ -1 +0,0 @@",
"-x instanceof String;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "bc73ac8dfd8a42fc942bd8dac8012ef2e3a217da..b5645de0a9c0002d8f44d302c200dd88ff113f52"
"shas": "4dea2afbe25572aee977123753ff00348123b34d..5fe71a17cc99387501792a564bc50da57decd600"
}]

View File

@ -16,7 +16,7 @@
]
}
},
"summary": "Added the 'foo and bar' boolean operator"
"summary": "Added the 'foo and bar' binary statement"
}
]
},
@ -34,7 +34,7 @@
"+foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "c7d3f438c72d2ab2a09e3fa47ba1cf9b175d2a9b..0bc5f86f8c781f501003b94889818004364037b9"
"shas": "48bff6bf54e74bb5709add925c8101431133d29b..718a1f41b48403cdcb927be311af138014047e2a"
}
,{
"testCaseDescription": "ruby-and-or-replacement-insert-test",
@ -54,7 +54,7 @@
]
}
},
"summary": "Added the 'foo or bar' boolean operator"
"summary": "Added the 'foo or bar' binary statement"
},
{
"span": {
@ -69,7 +69,7 @@
]
}
},
"summary": "Added the 'a or b and c' boolean operator"
"summary": "Added the 'a or b and c' binary statement"
},
{
"span": {
@ -84,7 +84,7 @@
]
}
},
"summary": "Added the 'foo and bar' boolean operator"
"summary": "Added the 'foo and bar' binary statement"
}
]
},
@ -105,13 +105,40 @@
" foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0bc5f86f8c781f501003b94889818004364037b9..2c06275827cfa3bbaada5117072cd19574d8d7a9"
"shas": "718a1f41b48403cdcb927be311af138014047e2a..b7e04363c991e6a2cd1df38c5f20aa8e9ff7e337"
}
,{
"testCaseDescription": "ruby-and-or-delete-insert-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
11
]
},
{
"start": [
1,
1
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced the 'foo or bar' binary statement with the 'foo and bar' binary statement"
},
{
"span": {
"delete": {
@ -125,7 +152,7 @@
]
}
},
"summary": "Deleted the 'a or b and c' boolean operator"
"summary": "Deleted the 'a or b and c' binary statement"
}
]
},
@ -147,13 +174,40 @@
" foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "2c06275827cfa3bbaada5117072cd19574d8d7a9..e800a12b636011a03bc99b86835317cd7ad3ecd1"
"shas": "b7e04363c991e6a2cd1df38c5f20aa8e9ff7e337..82a2a103e2f86084de0d80d198270d87f02eda63"
}
,{
"testCaseDescription": "ruby-and-or-replacement-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
12
]
},
{
"start": [
1,
1
],
"end": [
1,
11
]
}
]
},
"summary": "Replaced the 'foo and bar' binary statement with the 'foo or bar' binary statement"
},
{
"span": {
"insert": {
@ -167,7 +221,7 @@
]
}
},
"summary": "Added the 'a or b and c' boolean operator"
"summary": "Added the 'a or b and c' binary statement"
}
]
},
@ -189,7 +243,7 @@
" foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e800a12b636011a03bc99b86835317cd7ad3ecd1..c9340cbb8ada35c896fa285761dd0e9dac96fd0b"
"shas": "82a2a103e2f86084de0d80d198270d87f02eda63..d10ab6a75880a64eef54c3aa82d677def1938901"
}
,{
"testCaseDescription": "ruby-and-or-delete-replacement-test",
@ -200,46 +254,16 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
1,
11
4,
12
]
}
},
"summary": "Deleted the 'foo or bar' boolean operator"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Deleted the 'a or b and c' boolean operator"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
13
]
}
},
"summary": "Added the 'a or b and c' boolean operator"
"summary": "Deleted the 'foo and bar' binary statement"
}
]
},
@ -261,7 +285,7 @@
"-foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "c9340cbb8ada35c896fa285761dd0e9dac96fd0b..66224b27113350bc8e9d7ffddc2fe22fee05baa2"
"shas": "d10ab6a75880a64eef54c3aa82d677def1938901..f4fa4f7622bdfac02faa1feecd7993e7201467b2"
}
,{
"testCaseDescription": "ruby-and-or-delete-test",
@ -281,7 +305,7 @@
]
}
},
"summary": "Deleted the 'foo and bar' boolean operator"
"summary": "Deleted the 'foo and bar' binary statement"
}
]
},
@ -301,7 +325,7 @@
" a or b and c"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "66224b27113350bc8e9d7ffddc2fe22fee05baa2..22157102e33b0c6c91eed738c3c7a3ce0edc3fa7"
"shas": "f4fa4f7622bdfac02faa1feecd7993e7201467b2..9971253676f78cad3cc69fd652b087501fb4c0bc"
}
,{
"testCaseDescription": "ruby-and-or-delete-rest-test",
@ -321,7 +345,7 @@
]
}
},
"summary": "Deleted the 'foo or bar' boolean operator"
"summary": "Deleted the 'foo or bar' binary statement"
},
{
"span": {
@ -336,7 +360,7 @@
]
}
},
"summary": "Deleted the 'a or b and c' boolean operator"
"summary": "Deleted the 'a or b and c' binary statement"
}
]
},
@ -355,5 +379,5 @@
"-a or b and c"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "22157102e33b0c6c91eed738c3c7a3ce0edc3fa7..956b136e24f76c977fefd27d5368ecd527f721ec"
"shas": "9971253676f78cad3cc69fd652b087501fb4c0bc..e29d844a20e10103ff1197d78c6639bba8fc6e8a"
}]

View File

@ -16,7 +16,7 @@
]
}
},
"summary": "Added the 'a | b' bitwise operator"
"summary": "Added the 'a | b' binary statement"
},
{
"span": {
@ -31,7 +31,7 @@
]
}
},
"summary": "Added the 'a >> b' bitwise operator"
"summary": "Added the 'a >> b' binary statement"
},
{
"span": {
@ -46,7 +46,7 @@
]
}
},
"summary": "Added the 'a ^ b' bitwise operator"
"summary": "Added the 'a ^ b' binary statement"
}
]
},
@ -66,7 +66,7 @@
"+a ^ b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "70d36a6a9817b1e91707c1f7f830a0568b959efa..ce65ef18e5032a270bbfcef7d593c68d270abaf4"
"shas": "f7475f092fd81593aab4939187efba0e1a894cc6..1fb1f51718a4b8ddf240e498b79dd574de91f7ee"
}
,{
"testCaseDescription": "ruby-bitwise-operator-replacement-insert-test",
@ -86,7 +86,7 @@
]
}
},
"summary": "Added the 'a & b' bitwise operator"
"summary": "Added the 'a & b' binary statement"
},
{
"span": {
@ -101,7 +101,7 @@
]
}
},
"summary": "Added the 'a << b' bitwise operator"
"summary": "Added the 'a << b' binary statement"
},
{
"span": {
@ -116,7 +116,7 @@
]
}
},
"summary": "Added the 'a | b' bitwise operator"
"summary": "Added the 'a | b' binary statement"
},
{
"span": {
@ -131,7 +131,7 @@
]
}
},
"summary": "Added the 'a >> b' bitwise operator"
"summary": "Added the 'a >> b' binary statement"
},
{
"span": {
@ -146,7 +146,7 @@
]
}
},
"summary": "Added the 'a ^ b' bitwise operator"
"summary": "Added the 'a ^ b' binary statement"
}
]
},
@ -171,7 +171,7 @@
" a ^ b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ce65ef18e5032a270bbfcef7d593c68d270abaf4..3710a2840202f8625b9a440d8b556a6d30d2b6f6"
"shas": "1fb1f51718a4b8ddf240e498b79dd574de91f7ee..6aedb1ce3a8797ff587dd8ab390fd0ce6aeb0d47"
}
,{
"testCaseDescription": "ruby-bitwise-operator-delete-insert-test",
@ -191,7 +191,61 @@
]
}
},
"summary": "Added the 'a | b' bitwise operator"
"summary": "Added the 'a | b' binary statement"
},
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
6
]
},
{
"start": [
2,
1
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'a & b' binary statement with the 'a >> b' binary statement"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
7
]
},
{
"start": [
3,
1
],
"end": [
3,
6
]
}
]
},
"summary": "Replaced the 'a << b' binary statement with the 'a ^ b' binary statement"
}
]
},
@ -216,13 +270,43 @@
" a ^ b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "3710a2840202f8625b9a440d8b556a6d30d2b6f6..88289eb5fde1222a010efda881ce7888c282fe61"
"shas": "6aedb1ce3a8797ff587dd8ab390fd0ce6aeb0d47..0549c1aa48fc56756472ca67726a9003416f9454"
}
,{
"testCaseDescription": "ruby-bitwise-operator-replacement-test",
"expectedResult": {
"changes": {
"bitwise-operator.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'a & b' binary statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'a << b' binary statement"
},
{
"span": {
"delete": {
@ -236,7 +320,37 @@
]
}
},
"summary": "Deleted the 'a | b' bitwise operator"
"summary": "Deleted the 'a | b' binary statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'a >> b' binary statement"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
6
]
}
},
"summary": "Deleted the 'a ^ b' binary statement"
}
]
},
@ -261,7 +375,7 @@
" a ^ b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "88289eb5fde1222a010efda881ce7888c282fe61..5ae589defd184d837cb3d384ab225f42299801d8"
"shas": "0549c1aa48fc56756472ca67726a9003416f9454..8a618461620c18e9ea3a33b5b770de186e326ebc"
}
,{
"testCaseDescription": "ruby-bitwise-operator-delete-replacement-test",
@ -281,7 +395,7 @@
]
}
},
"summary": "Deleted the 'a & b' bitwise operator"
"summary": "Deleted the 'a & b' binary statement"
},
{
"span": {
@ -296,7 +410,7 @@
]
}
},
"summary": "Deleted the 'a << b' bitwise operator"
"summary": "Deleted the 'a << b' binary statement"
},
{
"span": {
@ -311,7 +425,67 @@
]
}
},
"summary": "Deleted the 'a | b' bitwise operator"
"summary": "Deleted the 'a | b' binary statement"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Deleted the 'a >> b' binary statement"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
6
]
}
},
"summary": "Deleted the 'a ^ b' binary statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
6
]
}
},
"summary": "Added the 'a & b' binary statement"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Added the 'a << b' binary statement"
}
]
},
@ -338,7 +512,7 @@
"+a << b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "5ae589defd184d837cb3d384ab225f42299801d8..29cf76ea1e49cdef2e616fed189fec268693ca87"
"shas": "8a618461620c18e9ea3a33b5b770de186e326ebc..a5688f715668b3db076f20ff3399d2bff365d1da"
}
,{
"testCaseDescription": "ruby-bitwise-operator-delete-test",
@ -358,7 +532,7 @@
]
}
},
"summary": "Deleted the 'a | b' bitwise operator"
"summary": "Deleted the 'a | b' binary statement"
},
{
"span": {
@ -373,7 +547,7 @@
]
}
},
"summary": "Deleted the 'a >> b' bitwise operator"
"summary": "Deleted the 'a >> b' binary statement"
},
{
"span": {
@ -388,7 +562,7 @@
]
}
},
"summary": "Deleted the 'a ^ b' bitwise operator"
"summary": "Deleted the 'a ^ b' binary statement"
}
]
},
@ -410,7 +584,7 @@
" a << b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "29cf76ea1e49cdef2e616fed189fec268693ca87..4bb4fee464aeaf7f957b7750b0947e7c02f2a8a8"
"shas": "a5688f715668b3db076f20ff3399d2bff365d1da..67a9aacd2e7ce87b09f9e3772b7766c58e875edd"
}
,{
"testCaseDescription": "ruby-bitwise-operator-delete-rest-test",
@ -430,7 +604,7 @@
]
}
},
"summary": "Deleted the 'a & b' bitwise operator"
"summary": "Deleted the 'a & b' binary statement"
},
{
"span": {
@ -445,7 +619,7 @@
]
}
},
"summary": "Deleted the 'a << b' bitwise operator"
"summary": "Deleted the 'a << b' binary statement"
}
]
},
@ -464,5 +638,5 @@
"-a << b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "4bb4fee464aeaf7f957b7750b0947e7c02f2a8a8..8b196e55798c1a5f125a87a869f770dca83665d6"
"shas": "67a9aacd2e7ce87b09f9e3772b7766c58e875edd..1965f9bdeebab8468bebb4f2c29230d3a42c255e"
}]

View File

@ -16,7 +16,7 @@
]
}
},
"summary": "Added the 'a || b' boolean operator"
"summary": "Added the 'a || b' binary statement"
}
]
},
@ -34,7 +34,7 @@
"+a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "5b279526f66afb77b2588f5173ce44d7cc693f97..53ec9b4615b8872e47ba643814f579eb3d74ef32"
"shas": "e29d844a20e10103ff1197d78c6639bba8fc6e8a..df14bb28f16cb2a1559a25f79ed0f828988ae3f1"
}
,{
"testCaseDescription": "ruby-boolean-operator-replacement-insert-test",
@ -54,7 +54,7 @@
]
}
},
"summary": "Added the 'a && b' boolean operator"
"summary": "Added the 'a && b' binary statement"
},
{
"span": {
@ -69,7 +69,7 @@
]
}
},
"summary": "Added the 'a || b' boolean operator"
"summary": "Added the 'a || b' binary statement"
}
]
},
@ -89,12 +89,42 @@
" a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "53ec9b4615b8872e47ba643814f579eb3d74ef32..02c804c5e37002a6843f3fc329c5db03ad4d51f6"
"shas": "df14bb28f16cb2a1559a25f79ed0f828988ae3f1..f5f5bd68d54c7d785cb8be9fa807e45b0edb3e49"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-insert-test",
"expectedResult": {
"changes": {},
"changes": {
"boolean-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'a && b' binary statement with the 'a || b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
@ -112,12 +142,42 @@
" a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "02c804c5e37002a6843f3fc329c5db03ad4d51f6..144d5b79b707781d8b5d1d56e281bcaa8598ae17"
"shas": "f5f5bd68d54c7d785cb8be9fa807e45b0edb3e49..b6258c7694077f26c384afdba0d38ff1c987c01e"
}
,{
"testCaseDescription": "ruby-boolean-operator-replacement-test",
"expectedResult": {
"changes": {},
"changes": {
"boolean-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'a || b' binary statement with the 'a && b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
@ -135,7 +195,7 @@
" a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "144d5b79b707781d8b5d1d56e281bcaa8598ae17..000c0198a566086df4d95a1ffd575748b7721552"
"shas": "b6258c7694077f26c384afdba0d38ff1c987c01e..53428a8acedfee4c1f2f28b0c8b798fc74d5ae20"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-replacement-test",
@ -155,7 +215,37 @@
]
}
},
"summary": "Deleted the 'a && b' boolean operator"
"summary": "Deleted the 'a && b' binary statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'a || b' binary statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'a && b' binary statement"
}
]
},
@ -176,7 +266,7 @@
"+a && b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "000c0198a566086df4d95a1ffd575748b7721552..f363216d5459fb0eafeb0168cc3f4af6d11f8cd5"
"shas": "53428a8acedfee4c1f2f28b0c8b798fc74d5ae20..11ad3b40423df923fb6260046df3bd83b3b2fc94"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-test",
@ -196,7 +286,7 @@
]
}
},
"summary": "Deleted the 'a || b' boolean operator"
"summary": "Deleted the 'a || b' binary statement"
}
]
},
@ -215,7 +305,7 @@
" a && b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f363216d5459fb0eafeb0168cc3f4af6d11f8cd5..57a8c0847390f2f78910231321007d7b2c86cc7a"
"shas": "11ad3b40423df923fb6260046df3bd83b3b2fc94..1a515a532b8a07afeeedbdd56956bf3e6a4f4f57"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-rest-test",
@ -235,7 +325,7 @@
]
}
},
"summary": "Deleted the 'a && b' boolean operator"
"summary": "Deleted the 'a && b' binary statement"
}
]
},
@ -253,5 +343,5 @@
"-a && b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "57a8c0847390f2f78910231321007d7b2c86cc7a..0c8195a0d30149b84b53bc2c98687d24a787f4dd"
"shas": "1a515a532b8a07afeeedbdd56956bf3e6a4f4f57..7c5058a233fff0a5b08a6fa3752565ecbdde40e5"
}]

View File

@ -16,7 +16,7 @@
]
}
},
"summary": "Added the 'x < y' relational operator"
"summary": "Added the 'x < y' binary statement"
},
{
"span": {
@ -31,7 +31,7 @@
]
}
},
"summary": "Added the 'a > b' relational operator"
"summary": "Added the 'a > b' binary statement"
}
]
},
@ -50,7 +50,7 @@
"+a > b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "cc9a4a6fa2a1c65983250a900daf6501538b4cd8..d0eb4857f83d5eef8c789d9b1800947161d8876d"
"shas": "90aa585d4ae985a7c45200caf714149779717558..3f805e1231d263aaee85a8ac7d2ae11fd70c4fc6"
}
,{
"testCaseDescription": "ruby-comparision-operator-replacement-insert-test",
@ -70,7 +70,7 @@
]
}
},
"summary": "Added the 'x <= y' relational operator"
"summary": "Added the 'x <= y' binary statement"
},
{
"span": {
@ -85,7 +85,7 @@
]
}
},
"summary": "Added the 'a >= b' relational operator"
"summary": "Added the 'a >= b' binary statement"
},
{
"span": {
@ -100,7 +100,7 @@
]
}
},
"summary": "Added the 'x < y' relational operator"
"summary": "Added the 'x < y' binary statement"
},
{
"span": {
@ -115,7 +115,7 @@
]
}
},
"summary": "Added the 'a > b' relational operator"
"summary": "Added the 'a > b' binary statement"
}
]
},
@ -138,12 +138,69 @@
" a > b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d0eb4857f83d5eef8c789d9b1800947161d8876d..186f6c1cb9c2260246f3126b1203b54b9670ea09"
"shas": "3f805e1231d263aaee85a8ac7d2ae11fd70c4fc6..a6a5370ffbd9e6d6f1c2b0420eabe85b2724e073"
}
,{
"testCaseDescription": "ruby-comparision-operator-delete-insert-test",
"expectedResult": {
"changes": {},
"changes": {
"comparision-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced the 'x <= y' binary statement with the 'x < y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
7
]
},
{
"start": [
2,
1
],
"end": [
2,
6
]
}
]
},
"summary": "Replaced the 'a >= b' binary statement with the 'a > b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
@ -164,12 +221,69 @@
" x < y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "186f6c1cb9c2260246f3126b1203b54b9670ea09..4e7370cd85c7f324871137855a459a1c583bce75"
"shas": "a6a5370ffbd9e6d6f1c2b0420eabe85b2724e073..eb604c0bcf71199d5c621faae2e35bf19d5d38f5"
}
,{
"testCaseDescription": "ruby-comparision-operator-replacement-test",
"expectedResult": {
"changes": {},
"changes": {
"comparision-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
6
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'x < y' binary statement with the 'x <= y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
6
]
},
{
"start": [
2,
1
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'a > b' binary statement with the 'a >= b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
@ -190,7 +304,7 @@
" x < y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "4e7370cd85c7f324871137855a459a1c583bce75..a26bfabeda46c054da38b6aaf5564c5b9e575294"
"shas": "eb604c0bcf71199d5c621faae2e35bf19d5d38f5..85ec514fd02a930895b759fde6c1ae1c168f2305"
}
,{
"testCaseDescription": "ruby-comparision-operator-delete-replacement-test",
@ -210,7 +324,7 @@
]
}
},
"summary": "Deleted the 'x <= y' relational operator"
"summary": "Deleted the 'x <= y' binary statement"
},
{
"span": {
@ -225,7 +339,67 @@
]
}
},
"summary": "Deleted the 'a >= b' relational operator"
"summary": "Deleted the 'a >= b' binary statement"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
6
]
}
},
"summary": "Deleted the 'x < y' binary statement"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
6
]
}
},
"summary": "Deleted the 'a > b' binary statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Added the 'x <= y' binary statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Added the 'a >= b' binary statement"
}
]
},
@ -250,7 +424,7 @@
"+a >= b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a26bfabeda46c054da38b6aaf5564c5b9e575294..0e4db6b78d0c970ab1b1c30a357997ccd2dd80fa"
"shas": "85ec514fd02a930895b759fde6c1ae1c168f2305..6c1ce08787e2be33cdff965236183001674249e0"
}
,{
"testCaseDescription": "ruby-comparision-operator-delete-test",
@ -270,7 +444,7 @@
]
}
},
"summary": "Deleted the 'x < y' relational operator"
"summary": "Deleted the 'x < y' binary statement"
},
{
"span": {
@ -285,7 +459,7 @@
]
}
},
"summary": "Deleted the 'a > b' relational operator"
"summary": "Deleted the 'a > b' binary statement"
}
]
},
@ -306,7 +480,7 @@
" a >= b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0e4db6b78d0c970ab1b1c30a357997ccd2dd80fa..84a86501aebef11b8627b8524fc8d324665ffc44"
"shas": "6c1ce08787e2be33cdff965236183001674249e0..ef13be31a7ebb4b35e3c83e52bc45d3a345d0503"
}
,{
"testCaseDescription": "ruby-comparision-operator-delete-rest-test",
@ -326,7 +500,7 @@
]
}
},
"summary": "Deleted the 'x <= y' relational operator"
"summary": "Deleted the 'x <= y' binary statement"
},
{
"span": {
@ -341,7 +515,7 @@
]
}
},
"summary": "Deleted the 'a >= b' relational operator"
"summary": "Deleted the 'a >= b' binary statement"
}
]
},
@ -360,5 +534,5 @@
"-a >= b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "84a86501aebef11b8627b8524fc8d324665ffc44..70d36a6a9817b1e91707c1f7f830a0568b959efa"
"shas": "ef13be31a7ebb4b35e3c83e52bc45d3a345d0503..f7475f092fd81593aab4939187efba0e1a894cc6"
}]

View File

@ -16,7 +16,7 @@
]
}
},
"summary": "Added the 'x' conditional assignment"
"summary": "Added the 'x' operator assignment"
}
]
},
@ -34,7 +34,7 @@
"+x ||= 5"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "6564c9c8832540d910a4118a6130305613ef9772..737bffe1cb105e55eb30dcb5e66499a162216c4d"
"shas": "bba90b67e00732e5f4f32a72f7b6b131d33dd30e..aed651d3923765ed3138e049c2cc0ba2cde6cb84"
}
,{
"testCaseDescription": "ruby-conditional-assignment-replacement-insert-test",
@ -54,7 +54,7 @@
]
}
},
"summary": "Added the 'x' conditional assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -69,7 +69,7 @@
]
}
},
"summary": "Added the 'x' conditional assignment"
"summary": "Added the 'x' operator assignment"
}
]
},
@ -89,7 +89,7 @@
" x ||= 5"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "737bffe1cb105e55eb30dcb5e66499a162216c4d..b4680d4032610561ef31cbb0508bfc9573be0d0c"
"shas": "aed651d3923765ed3138e049c2cc0ba2cde6cb84..db83fd26ce25ec9193f84fd776f8c36289ce7516"
}
,{
"testCaseDescription": "ruby-conditional-assignment-delete-insert-test",
@ -121,7 +121,7 @@
}
]
},
"summary": "Replaced '7' with '5'"
"summary": "Replaced '7' with '5' in the x operator assignment"
}
]
},
@ -142,7 +142,7 @@
" x ||= 5"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "b4680d4032610561ef31cbb0508bfc9573be0d0c..cce1693dd4e7b6101f7cbcc9100b4c3276194fa2"
"shas": "db83fd26ce25ec9193f84fd776f8c36289ce7516..c9bcb43f918ac8a89adf2e4f5227113fd65c13cc"
}
,{
"testCaseDescription": "ruby-conditional-assignment-replacement-test",
@ -174,7 +174,7 @@
}
]
},
"summary": "Replaced '5' with '7'"
"summary": "Replaced '5' with '7' in the x operator assignment"
}
]
},
@ -195,7 +195,7 @@
" x ||= 5"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "cce1693dd4e7b6101f7cbcc9100b4c3276194fa2..8bd810b4f976b9701ff7a0ceb9d018bfeac4780e"
"shas": "c9bcb43f918ac8a89adf2e4f5227113fd65c13cc..12100cef49bba40f05ebaf7f015e6f39c409f2c2"
}
,{
"testCaseDescription": "ruby-conditional-assignment-delete-replacement-test",
@ -215,7 +215,7 @@
]
}
},
"summary": "Deleted the 'x' conditional assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -230,7 +230,7 @@
]
}
},
"summary": "Deleted the 'x' conditional assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -245,7 +245,7 @@
]
}
},
"summary": "Added the 'x' conditional assignment"
"summary": "Added the 'x' operator assignment"
}
]
},
@ -266,7 +266,7 @@
"+x &&= 7"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "8bd810b4f976b9701ff7a0ceb9d018bfeac4780e..ddc2e0154b1f8cbb3c3e3800549d0c5126c7ff52"
"shas": "12100cef49bba40f05ebaf7f015e6f39c409f2c2..b2e02b7f3e454208a01199c2196b0a39eaabe4e0"
}
,{
"testCaseDescription": "ruby-conditional-assignment-delete-test",
@ -286,7 +286,7 @@
]
}
},
"summary": "Deleted the 'x' conditional assignment"
"summary": "Deleted the 'x' operator assignment"
}
]
},
@ -305,7 +305,7 @@
" x &&= 7"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ddc2e0154b1f8cbb3c3e3800549d0c5126c7ff52..4f41d6075e03521d205fb38e22fe31e8f89ffcd9"
"shas": "b2e02b7f3e454208a01199c2196b0a39eaabe4e0..923f68eae40f6ea6b48688f9c0170ceb67f54fb3"
}
,{
"testCaseDescription": "ruby-conditional-assignment-delete-rest-test",
@ -325,7 +325,7 @@
]
}
},
"summary": "Deleted the 'x' conditional assignment"
"summary": "Deleted the 'x' operator assignment"
}
]
},
@ -343,5 +343,5 @@
"-x &&= 7"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "4f41d6075e03521d205fb38e22fe31e8f89ffcd9..78a9116b77a62e27008d72a5a1f2b1b9bec795bd"
"shas": "923f68eae40f6ea6b48688f9c0170ceb67f54fb3..016efbbed35a70176cf3ec8bb08369cf7889c2e7"
}]

View File

@ -40,7 +40,7 @@
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a8b440ad76232e4e95f5a5ed53b9b6604ece8a17..4469095014f7bc3f2ba06bba93197b7113965a36"
"shas": "016efbbed35a70176cf3ec8bb08369cf7889c2e7..e64394684b86a0aa1426479d973d5fa65115c6d8"
}
,{
"testCaseDescription": "ruby-if-replacement-insert-test",
@ -121,7 +121,7 @@
" elsif quux"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "4469095014f7bc3f2ba06bba93197b7113965a36..49f95d96fcf4b3e1ddc5d64c6d19c1f1415aa21f"
"shas": "e64394684b86a0aa1426479d973d5fa65115c6d8..3b952dad00efbf05e77af42fc337786d53c25ab0"
}
,{
"testCaseDescription": "ruby-if-delete-insert-test",
@ -227,7 +227,7 @@
" bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "49f95d96fcf4b3e1ddc5d64c6d19c1f1415aa21f..69de797721bf90b5e163efddf6c21683973e91e5"
"shas": "3b952dad00efbf05e77af42fc337786d53c25ab0..ecebede079885b31f55ce79cbe6a919b20618dd1"
}
,{
"testCaseDescription": "ruby-if-replacement-test",
@ -333,7 +333,7 @@
" bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "69de797721bf90b5e163efddf6c21683973e91e5..c4dc260bbc97bb7f7c90d41a7ee7418e31529715"
"shas": "ecebede079885b31f55ce79cbe6a919b20618dd1..f34e4ac45eb68b1d48fe4e19559c716b1ae9765a"
}
,{
"testCaseDescription": "ruby-if-delete-replacement-test",
@ -391,7 +391,7 @@
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "c4dc260bbc97bb7f7c90d41a7ee7418e31529715..941d12bbe9281602e9f778ef87716fa0cdc94f6c"
"shas": "f34e4ac45eb68b1d48fe4e19559c716b1ae9765a..975011a6b4d433e9c281ccc29d9482c5aeca618c"
}
,{
"testCaseDescription": "ruby-if-delete-test",
@ -438,7 +438,7 @@
" if y then"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "941d12bbe9281602e9f778ef87716fa0cdc94f6c..79311ce946c9650610644371262924744f9acecc"
"shas": "975011a6b4d433e9c281ccc29d9482c5aeca618c..e01119c665cbc563d41d8cd9492f8a2d7f04c15a"
}
,{
"testCaseDescription": "ruby-if-delete-rest-test",
@ -494,5 +494,5 @@
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "79311ce946c9650610644371262924744f9acecc..6745758f03dc308eff3e95e8876445225bcdf49e"
"shas": "e01119c665cbc563d41d8cd9492f8a2d7f04c15a..4b3dda74358a83438349bc50dc9bb75e6d632e6a"
}]

View File

@ -16,7 +16,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -31,7 +31,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -46,7 +46,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -61,7 +61,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -76,7 +76,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
}
]
},
@ -98,7 +98,7 @@
"+x **= 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "b8a1e5f549bc1fa5a1424093d499d32fa0987cee..5438892990d5ecfa57ee99c577aa175b73ffbabe"
"shas": "1965f9bdeebab8468bebb4f2c29230d3a42c255e..7c9d58241d4b18ce09a2b955af2bafa7c74982c0"
}
,{
"testCaseDescription": "ruby-math-assignment-replacement-insert-test",
@ -118,7 +118,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -133,7 +133,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -148,7 +148,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -163,7 +163,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -178,7 +178,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -193,7 +193,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -208,7 +208,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -223,7 +223,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -238,7 +238,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
},
{
"span": {
@ -253,7 +253,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
}
]
},
@ -283,7 +283,7 @@
" x *= 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "5438892990d5ecfa57ee99c577aa175b73ffbabe..f70cdf5d64b650094018ccee6d9b42009ad22fde"
"shas": "7c9d58241d4b18ce09a2b955af2bafa7c74982c0..77f634748f5b464e65820506739bcc6a626d81b9"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-insert-test",
@ -315,7 +315,7 @@
}
]
},
"summary": "Replaced '2' with '1' in the x math assignment"
"summary": "Replaced '2' with '1' in the x operator assignment"
}
]
},
@ -337,7 +337,7 @@
" x /= 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f70cdf5d64b650094018ccee6d9b42009ad22fde..e9c35072aff21a20a3e388f9cf3c172194218160"
"shas": "77f634748f5b464e65820506739bcc6a626d81b9..6440a1a1d8cc18d572ea627cb86b9be3f4dc5fa4"
}
,{
"testCaseDescription": "ruby-math-assignment-replacement-test",
@ -369,7 +369,7 @@
}
]
},
"summary": "Replaced '1' with '2' in the x math assignment"
"summary": "Replaced '1' with '2' in the x operator assignment"
}
]
},
@ -391,7 +391,7 @@
" x /= 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e9c35072aff21a20a3e388f9cf3c172194218160..76a45dcf02f834864ade4b2ed1ec5fd0dd0c7f76"
"shas": "6440a1a1d8cc18d572ea627cb86b9be3f4dc5fa4..68a0167bd4f2dc5c50eef89de25c6f8756a5f101"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-replacement-test",
@ -411,7 +411,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -426,7 +426,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -441,7 +441,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -456,7 +456,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -471,7 +471,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -486,7 +486,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -501,7 +501,7 @@
]
}
},
"summary": "Added the 'x' math assignment"
"summary": "Added the 'x' operator assignment"
}
]
},
@ -533,7 +533,7 @@
" x /= 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "76a45dcf02f834864ade4b2ed1ec5fd0dd0c7f76..33f478735db5f9a23c2760a55dfc3e4acbdc46f8"
"shas": "68a0167bd4f2dc5c50eef89de25c6f8756a5f101..f2ef306509a3a836a1c92fe0a1424d07689f6ed8"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-test",
@ -553,7 +553,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -568,7 +568,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -583,7 +583,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -598,7 +598,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -613,7 +613,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
}
]
},
@ -638,7 +638,7 @@
" x *= 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "33f478735db5f9a23c2760a55dfc3e4acbdc46f8..f81054ebeafb1e11c934903a5f5bc2341f79a500"
"shas": "f2ef306509a3a836a1c92fe0a1424d07689f6ed8..baf89bf25b9b1f5ce42086e5175f7803db41fce6"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-rest-test",
@ -658,7 +658,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -673,7 +673,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -688,7 +688,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -703,7 +703,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
},
{
"span": {
@ -718,7 +718,7 @@
]
}
},
"summary": "Deleted the 'x' math assignment"
"summary": "Deleted the 'x' operator assignment"
}
]
},
@ -740,5 +740,5 @@
"-x **= 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f81054ebeafb1e11c934903a5f5bc2341f79a500..6564c9c8832540d910a4118a6130305613ef9772"
"shas": "baf89bf25b9b1f5ce42086e5175f7803db41fce6..bba90b67e00732e5f4f32a72f7b6b131d33dd30e"
}]

View File

@ -18,6 +18,21 @@
},
"summary": "Added 'nil' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
5
]
}
},
"summary": "Added 'self' identifier"
},
{
"span": {
"insert": {
@ -67,13 +82,28 @@
"+true"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "052401261edd2497b65b3546c0220694e89a03fb..eb4638e54cfb32940ad29a5070b90e44213e351b"
"shas": "2ffce3d30f77b7bd24e702013e47f91050c0ed06..3929950f26dec5f0af43dda569e0417dd949d355"
}
,{
"testCaseDescription": "ruby-pseudo-variables-replacement-insert-test",
"expectedResult": {
"changes": {
"pseudo-variables.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
5
]
}
},
"summary": "Added the 'self' identifier"
},
{
"span": {
"insert": {
@ -134,6 +164,21 @@
},
"summary": "Added the 'nil' identifier"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
5
]
}
},
"summary": "Added the 'self' identifier"
},
{
"span": {
"insert": {
@ -190,7 +235,7 @@
" false"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "eb4638e54cfb32940ad29a5070b90e44213e351b..35f40623910a2294db51fb259e7b4af6954dcb0f"
"shas": "3929950f26dec5f0af43dda569e0417dd949d355..38766d05c3684529438061f58dd0252025aa52b0"
}
,{
"testCaseDescription": "ruby-pseudo-variables-delete-insert-test",
@ -226,30 +271,18 @@
},
{
"span": {
"replace": [
{
"start": [
3,
1
],
"end": [
3,
5
]
},
{
"start": [
3,
1
],
"end": [
3,
6
]
}
]
"insert": {
"start": [
3,
1
],
"end": [
3,
6
]
}
},
"summary": "Replaced 'TRUE' with 'false'"
"summary": "Added 'false'"
},
{
"span": {
@ -266,6 +299,21 @@
},
"summary": "Added 'true'"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
5
]
}
},
"summary": "Deleted 'TRUE'"
},
{
"span": {
"delete": {
@ -306,7 +354,7 @@
" false"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "35f40623910a2294db51fb259e7b4af6954dcb0f..7228ef9145f92f76d1ce1f9af3111a0a9f402636"
"shas": "38766d05c3684529438061f58dd0252025aa52b0..8f80336c91ce46ae805eda02987947ab0efa3692"
}
,{
"testCaseDescription": "ruby-pseudo-variables-replacement-test",
@ -315,30 +363,33 @@
"pseudo-variables.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
4
]
},
{
"start": [
2,
1
],
"end": [
2,
4
]
}
]
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Replaced the 'nil' identifier with the 'NIL' identifier"
"summary": "Deleted the 'nil' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
4
]
}
},
"summary": "Added the 'NIL' identifier"
},
{
"span": {
@ -422,13 +473,28 @@
" false"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "7228ef9145f92f76d1ce1f9af3111a0a9f402636..247085a3bb210f1ee85ba391c96725e7311fce20"
"shas": "8f80336c91ce46ae805eda02987947ab0efa3692..9a312b15cd4f54406122fd3e1cd2240ccaa7391a"
}
,{
"testCaseDescription": "ruby-pseudo-variables-delete-replacement-test",
"expectedResult": {
"changes": {
"pseudo-variables.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
5
]
}
},
"summary": "Deleted the 'self' identifier"
},
{
"span": {
"delete": {
@ -478,47 +544,17 @@
"span": {
"delete": {
"start": [
5,
9,
1
],
"end": [
5,
9,
4
]
}
},
"summary": "Deleted the 'nil' identifier"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
6
]
}
},
"summary": "Deleted 'false'"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
5
]
}
},
"summary": "Deleted 'true'"
},
{
"span": {
"insert": {
@ -563,6 +599,36 @@
}
},
"summary": "Added 'FALSE'"
},
{
"span": {
"delete": {
"start": [
11,
1
],
"end": [
11,
6
]
}
},
"summary": "Deleted 'false'"
},
{
"span": {
"delete": {
"start": [
12,
1
],
"end": [
12,
5
]
}
},
"summary": "Deleted 'true'"
}
]
},
@ -594,7 +660,7 @@
"+FALSE"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "247085a3bb210f1ee85ba391c96725e7311fce20..3c4b678a23d925ae1efdd94cb47b240c63af6ff1"
"shas": "9a312b15cd4f54406122fd3e1cd2240ccaa7391a..8ce9065e59871233c9f7d7c2ca1447253e2a37d3"
}
,{
"testCaseDescription": "ruby-pseudo-variables-delete-test",
@ -616,6 +682,21 @@
},
"summary": "Deleted the 'nil' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
5
]
}
},
"summary": "Deleted the 'self' identifier"
},
{
"span": {
"delete": {
@ -668,13 +749,28 @@
" TRUE"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "3c4b678a23d925ae1efdd94cb47b240c63af6ff1..349da6fa88ae41a84f50976e21182a5d9cd7a701"
"shas": "8ce9065e59871233c9f7d7c2ca1447253e2a37d3..ae2b0ad6c228e0a8f301c9b3d6ff6edb1023c3c4"
}
,{
"testCaseDescription": "ruby-pseudo-variables-delete-rest-test",
"expectedResult": {
"changes": {
"pseudo-variables.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
5
]
}
},
"summary": "Deleted 'self' identifier"
},
{
"span": {
"delete": {
@ -739,5 +835,5 @@
"-FALSE"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "349da6fa88ae41a84f50976e21182a5d9cd7a701..f8cc3489b25f8d1857452648c25c51084dbdbdb9"
"shas": "ae2b0ad6c228e0a8f301c9b3d6ff6edb1023c3c4..a966f9b2783f127617cc42cbed16e6ec570b75ad"
}]

View File

@ -16,7 +16,7 @@
]
}
},
"summary": "Added the 'x == y' relational operator"
"summary": "Added the 'x == y' binary statement"
},
{
"span": {
@ -31,7 +31,7 @@
]
}
},
"summary": "Added the 'x != y' relational operator"
"summary": "Added the 'x != y' binary statement"
},
{
"span": {
@ -46,7 +46,7 @@
]
}
},
"summary": "Added the 'x === y' relational operator"
"summary": "Added the 'x === y' binary statement"
}
]
},
@ -66,7 +66,7 @@
"+x === y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0c8195a0d30149b84b53bc2c98687d24a787f4dd..a1f4def52826a2f5f35936ea4974cec5ea85e091"
"shas": "7c5058a233fff0a5b08a6fa3752565ecbdde40e5..bd8a856e8f56ace4398ea201818f1d2ba28fe4c8"
}
,{
"testCaseDescription": "ruby-relational-operator-replacement-insert-test",
@ -86,7 +86,7 @@
]
}
},
"summary": "Added the 'x <=> y' relational operator"
"summary": "Added the 'x <=> y' binary statement"
},
{
"span": {
@ -101,7 +101,7 @@
]
}
},
"summary": "Added the 'x =~ y' relational operator"
"summary": "Added the 'x =~ y' binary statement"
},
{
"span": {
@ -131,7 +131,7 @@
]
}
},
"summary": "Added the 'x == y' relational operator"
"summary": "Added the 'x == y' binary statement"
},
{
"span": {
@ -146,7 +146,7 @@
]
}
},
"summary": "Added the 'x != y' relational operator"
"summary": "Added the 'x != y' binary statement"
},
{
"span": {
@ -161,7 +161,7 @@
]
}
},
"summary": "Added the 'x === y' relational operator"
"summary": "Added the 'x === y' binary statement"
}
]
},
@ -187,7 +187,7 @@
" x === y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a1f4def52826a2f5f35936ea4974cec5ea85e091..a410e8475bcc3f55ccadce1c1de878e0f23137c8"
"shas": "bd8a856e8f56ace4398ea201818f1d2ba28fe4c8..c68133f93df60e32edbf8f4f54fd5fb233857e17"
}
,{
"testCaseDescription": "ruby-relational-operator-delete-insert-test",
@ -207,7 +207,61 @@
]
}
},
"summary": "Added the 'x == y' relational operator"
"summary": "Added the 'x == y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
8
]
},
{
"start": [
2,
1
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'x <=> y' binary statement with the 'x != y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
7
]
},
{
"start": [
3,
1
],
"end": [
3,
8
]
}
]
},
"summary": "Replaced the 'x =~ y' binary statement with the 'x === y' binary statement"
},
{
"span": {
@ -248,7 +302,7 @@
" x === y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a410e8475bcc3f55ccadce1c1de878e0f23137c8..863fa3c522169326664ae03b9d6fec02d4dd9eba"
"shas": "c68133f93df60e32edbf8f4f54fd5fb233857e17..ad13ab775a8fd37a46de7b08990b8061c84bba67"
}
,{
"testCaseDescription": "ruby-relational-operator-replacement-test",
@ -257,18 +311,33 @@
"relational-operator.rb": [
{
"span": {
"delete": {
"insert": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Added the 'x <=> y' binary statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x == y' relational operator"
"summary": "Added the 'x =~ y' binary statement"
},
{
"span": {
@ -284,6 +353,51 @@
}
},
"summary": "Added the 'x' assignment"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'x == y' binary statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x != y' binary statement"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
8
]
}
},
"summary": "Deleted the 'x === y' binary statement"
}
]
},
@ -309,7 +423,7 @@
" x === y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "863fa3c522169326664ae03b9d6fec02d4dd9eba..d8b19e6874eeee4b5190a4ec83a8f106c9374626"
"shas": "ad13ab775a8fd37a46de7b08990b8061c84bba67..c61d17cf7eb2887bbdf676ee6e57ebe1dca60402"
}
,{
"testCaseDescription": "ruby-relational-operator-delete-replacement-test",
@ -329,7 +443,7 @@
]
}
},
"summary": "Deleted the 'x <=> y' relational operator"
"summary": "Deleted the 'x <=> y' binary statement"
},
{
"span": {
@ -344,7 +458,7 @@
]
}
},
"summary": "Deleted the 'x =~ y' relational operator"
"summary": "Deleted the 'x =~ y' binary statement"
},
{
"span": {
@ -374,7 +488,67 @@
]
}
},
"summary": "Deleted the 'x == y' relational operator"
"summary": "Deleted the 'x == y' binary statement"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Deleted the 'x != y' binary statement"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
8
]
}
},
"summary": "Deleted the 'x === y' binary statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
8
]
}
},
"summary": "Added the 'x <=> y' binary statement"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Added the 'x =~ y' binary statement"
},
{
"span": {
@ -418,7 +592,7 @@
"+x =! y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d8b19e6874eeee4b5190a4ec83a8f106c9374626..26c6f1f20d765f5c209e74a29bb714b6b7aae5b7"
"shas": "c61d17cf7eb2887bbdf676ee6e57ebe1dca60402..99180bace272ebfed8d920758060fa1b1915e229"
}
,{
"testCaseDescription": "ruby-relational-operator-delete-test",
@ -438,7 +612,7 @@
]
}
},
"summary": "Deleted the 'x == y' relational operator"
"summary": "Deleted the 'x == y' binary statement"
},
{
"span": {
@ -453,7 +627,7 @@
]
}
},
"summary": "Deleted the 'x != y' relational operator"
"summary": "Deleted the 'x != y' binary statement"
},
{
"span": {
@ -468,7 +642,7 @@
]
}
},
"summary": "Deleted the 'x === y' relational operator"
"summary": "Deleted the 'x === y' binary statement"
}
]
},
@ -491,7 +665,7 @@
" x =! y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "26c6f1f20d765f5c209e74a29bb714b6b7aae5b7..17932b7d6a37caa52201ba5309a86f228fb81493"
"shas": "99180bace272ebfed8d920758060fa1b1915e229..1326cc387018c547c94716af26d3c421ba8fb0f5"
}
,{
"testCaseDescription": "ruby-relational-operator-delete-rest-test",
@ -511,7 +685,7 @@
]
}
},
"summary": "Deleted the 'x <=> y' relational operator"
"summary": "Deleted the 'x <=> y' binary statement"
},
{
"span": {
@ -526,7 +700,7 @@
]
}
},
"summary": "Deleted the 'x =~ y' relational operator"
"summary": "Deleted the 'x =~ y' binary statement"
},
{
"span": {
@ -561,5 +735,5 @@
"-x =! y"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "17932b7d6a37caa52201ba5309a86f228fb81493..cc9a4a6fa2a1c65983250a900daf6501538b4cd8"
"shas": "1326cc387018c547c94716af26d3c421ba8fb0f5..90aa585d4ae985a7c45200caf714149779717558"
}]

View File

@ -122,7 +122,7 @@
]
}
},
"summary": "Deleted the 'bar' identifier in the 'Error, x' rescue block"
"summary": "Deleted the 'bar' identifier in the 'Error, identifier' rescue block"
}
]
},
@ -166,7 +166,7 @@
]
}
},
"summary": "Added the 'bar' identifier in the 'Error, x' rescue block"
"summary": "Added the 'bar' identifier in the 'Error, identifier' rescue block"
}
]
},

View File

@ -11,7 +11,7 @@
1
],
"end": [
2,
3,
4
]
}
@ -27,15 +27,16 @@
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index e69de29..ee23477 100644",
"index e69de29..f43e020 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -0,0 +1,2 @@",
"@@ -0,0 +1,3 @@",
"+case foo",
"+when quux",
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "dc9d24ac927d2ba1f4d7331d5edcf9888c6bfbdf..8584062d9a54a14c1af0ac949bf9be286269f7f7"
"shas": "6320f83c8822c0efc1ee3f921342eb41977e9fb8..74481b83f4aaaca4705cd56d25d4e0159eabf9f3"
}
,{
"testCaseDescription": "ruby-when-insert-test",
@ -46,11 +47,11 @@
"span": {
"insert": {
"start": [
2,
3,
1
],
"end": [
3,
4,
1
]
}
@ -66,16 +67,17 @@
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index ee23477..92a40ca 100644",
"index f43e020..404ec25 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,2 +1,3 @@",
"@@ -1,3 +1,4 @@",
" case foo",
" when quux",
"+when bar",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "8584062d9a54a14c1af0ac949bf9be286269f7f7..522104f5e945e8b8529bcf56c273953d72594afa"
"shas": "74481b83f4aaaca4705cd56d25d4e0159eabf9f3..3af728dfa3c929198a7b5f92b1326eef3e79c4e0"
}
,{
"testCaseDescription": "ruby-when-replacement-test",
@ -86,16 +88,16 @@
"span": {
"insert": {
"start": [
3,
4,
3
],
"end": [
3,
4,
6
]
}
},
"summary": "Added the 'baz' identifier in a when comparison"
"summary": "Added the 'baz' identifier in the 'foo' case statement"
}
]
},
@ -106,17 +108,18 @@
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index 92a40ca..3c8eff2 100644",
"index 404ec25..7fb75f1 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,3 +1,4 @@",
"@@ -1,4 +1,5 @@",
" case foo",
" when quux",
" when bar",
"+ baz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "522104f5e945e8b8529bcf56c273953d72594afa..c35811be8fcc9afe2fad9fd988d9e95189c58765"
"shas": "3af728dfa3c929198a7b5f92b1326eef3e79c4e0..e1127e3df1d1ca4cd0a0b1424e1eed2bb185a34f"
}
,{
"testCaseDescription": "ruby-when-delete-replacement-test",
@ -127,16 +130,16 @@
"span": {
"delete": {
"start": [
3,
4,
3
],
"end": [
3,
4,
6
]
}
},
"summary": "Deleted the 'baz' identifier in a when comparison"
"summary": "Deleted the 'baz' identifier in the 'foo' case statement"
}
]
},
@ -147,17 +150,18 @@
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index 3c8eff2..92a40ca 100644",
"index 7fb75f1..404ec25 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,4 +1,3 @@",
"@@ -1,5 +1,4 @@",
" case foo",
" when quux",
" when bar",
"- baz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "c35811be8fcc9afe2fad9fd988d9e95189c58765..d091c742bdff6528f0464c6a0e1d369f6060ed1d"
"shas": "e1127e3df1d1ca4cd0a0b1424e1eed2bb185a34f..715d399400e789e7b9fe8d6298cb768670ddc619"
}
,{
"testCaseDescription": "ruby-when-delete-insert-test",
@ -168,11 +172,11 @@
"span": {
"delete": {
"start": [
2,
3,
1
],
"end": [
3,
4,
1
]
}
@ -188,16 +192,17 @@
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index 92a40ca..ee23477 100644",
"index 404ec25..f43e020 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,3 +1,2 @@",
"@@ -1,4 +1,3 @@",
" case foo",
" when quux",
"-when bar",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d091c742bdff6528f0464c6a0e1d369f6060ed1d..0d554900e6183bbfd1dc9ed4b90ffb74901991d6"
"shas": "715d399400e789e7b9fe8d6298cb768670ddc619..eb4e7c3c86b8e2410ba8cbde1a08156eb6ceded7"
}
,{
"testCaseDescription": "ruby-when-teardown-test",
@ -212,7 +217,7 @@
1
],
"end": [
2,
3,
4
]
}
@ -228,13 +233,14 @@
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index ee23477..e69de29 100644",
"index f43e020..e69de29 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,2 +0,0 @@",
"@@ -1,3 +0,0 @@",
"-case foo",
"-when quux",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0d554900e6183bbfd1dc9ed4b90ffb74901991d6..c723ad6d1865bc31b8b6d554c0768635937c0ab3"
"shas": "eb4e7c3c86b8e2410ba8cbde1a08156eb6ceded7..2ffce3d30f77b7bd24e702013e47f91050c0ed06"
}]

View File

@ -51,8 +51,8 @@
},
{
"syntax": "multiple-assignments",
"insert": "x, y, z = 10, 20, 30",
"replacement": "x, y = aVariable, 40"
"insert": "x, y, z = [10, 20, 30]",
"replacement": "x, *y = [10, 20, 30]"
},
{
"syntax": "pseudo-variables",

@ -1 +1 @@
Subproject commit 7b26c97829302e6f2c2fc76d9a1e5dc25caf58d9
Subproject commit 80946fe6667b3843c0bd704136ac929ca5f2e3e0

@ -1 +1 @@
Subproject commit 6320f83c8822c0efc1ee3f921342eb41977e9fb8
Subproject commit 4b3dda74358a83438349bc50dc9bb75e6d632e6a

@ -1 +1 @@
Subproject commit 2664b1599b1e68f772d59aa0d41638cdaa2b7fbf
Subproject commit 831c0f3a302e1bfc6439bb7f6be5ea557aeec03a