<s> package org . eclipse . jdt . internal . core . dom . rewrite ; public class NodeRewriteEvent extends RewriteEvent { private Object originalValue ; private Object newValue ; public NodeRewriteEvent ( Object originalValue , Object newValue ) { this . originalValue = originalValue ; this . newValue = newValue ; } public Object getNewValue ( ) { return this . newValue ; } public Object getOriginalValue ( ) { return this . originalValue ; } public int getChangeKind ( ) { if ( this . originalValue == this . newValue ) { return UNCHANGED ; } if ( this . originalValue == null ) { return INSERTED ; } if ( this . newValue == null ) { return REMOVED ; } if ( this . originalValue . equals ( this . newValue ) ) { return UNCHANGED ; } return REPLACED ; } public boolean isListRewrite ( ) { return false ; } public void setNewValue ( Object newValue ) { this . newValue = newValue ; } public RewriteEvent [ ] getChildren ( ) { return null ; } public String toString ( ) { StringBuffer buf = new StringBuffer ( ) ; switch ( getChangeKind ( ) ) { case INSERTED : buf . append ( " [inserted: " ) ; buf . append ( getNewValue ( ) ) ; buf . append ( ']' ) ; break ; case REPLACED : buf . append ( " [replaced: " ) ; buf . append ( getOriginalValue ( ) ) ; buf . append ( " -> " ) ; buf . append ( getNewValue ( ) ) ; buf . append ( ']' ) ; break ; case REMOVED : buf . append ( " [removed: " ) ; buf . append ( getOriginalValue ( ) ) ; buf . append ( ']' ) ; break ; default : buf . append ( " [unchanged]" ) ; } return buf . toString ( ) ; } } </s>