input
stringlengths
10
828
output
stringlengths
5
107
public binary and create binary and return new binary and
creates a new
public boolean is public return get containing class type is public else it is package visible
checks if this member is public
public class type get containing class type return owner class
returns the logical parent class of this member
public string get name return get containing class type get name
returns the name of this element
public reference get ambiguous reference return reference
returns the reference that was found ambiguous
public program model element list get possible resolutions return choices
returns the possible choices for the ambiguous reference
public declaration get ambiguous declaration return declaration
returns the declaration that was found ambiguous
public program model element get conflicting element return conflicting element
returns the conflicting element
public class type get self inheriting type return base class
returns a class type that inherits from itself
public binary and create binary and expression lhs expression rhs return new binary and lhs rhs
creates a new
public member reference list get references method m debug asserta m update model mutable set references mutable set element2references get m if references null return member reference list empty list int s references size if s 0 return member reference list empty list member reference mutable list result new member reference array list s for enumeration e references elements s 0 s 1 result add member reference e next element return result
retrieves the list of references to a given method or constructor
public constructor reference list get references constructor c debug asserta c update model mutable set references mutable set element2references get c if references null return constructor reference list empty list int s references size if s 0 return constructor reference list empty list constructor reference mutable list result new constructor reference array list s for enumeration e references elements s 0 s 1 result add constructor reference e next element return result
retrieves the list of references to a given constructor
public variable reference list get references variable v debug asserta v update model mutable set references mutable set element2references get v if references null return variable reference list empty list int s references size if s 0 return variable reference list empty list variable reference mutable list result new variable reference array list s for enumeration e references elements s 0 s 1 result add variable reference e next element return result
retrieves the list of references to a given variable
public field reference list get references field f debug asserta f update model mutable set references mutable set element2references get f if references null return field reference list empty list int s references size if s 0 return field reference list empty list field reference mutable list result new field reference array list s for enumeration e references elements s 0 s 1 result add field reference e next element return result
retrieves the list of references to a given field
public void clean up enumeration menum delete units elements while menum has more elements data location loc data location menum next element if loc instanceof data file location file f data file location loc get file f delete delete units clear
deletes all superfluous renamed detached compilation unit files
public type reference list get references type t debug asserta t update model mutable set references mutable set element2references get t if references null return type reference list empty list int s references size if s 0 return type reference list empty list type reference mutable list result new type reference array list s for enumeration e references elements s 0 s 1 result add type reference e next element return result
retrieves the list of references to a given type
public namespace reference list get references namespace p debug asserta p update model mutable set references mutable set element2references get p if references null return namespace reference list empty list int s references size if s 0 return namespace reference list empty list namespace reference mutable list result new namespace reference array list s for enumeration e references elements s 0 s 1 result add namespace reference e next element return result
retrieves the list of references to a given package
public binary and assignment create binary and assignment return new binary and assignment
creates a new
public using get ambiguous import return import statement
returns the import statement that was found ambiguous
public class type list get choices class type mutable list list new class type array list 2 list add version1 list add version2 return list
returns the possible imported class types
public void add change history listener change history listener chl synchronized change listeners change history listener new listeners new change history listener change listeners length 1 system arraycopy change listeners 0 new listeners 0 change listeners length new listeners change listeners length chl change listeners new listeners
adds a change history listener to the history
protected void register subtype class type subtype class type supertype program model info pmi supertype get program model info if pmi this default program model info pmi register subtype subtype supertype class type cache entry ctce class type cache entry class type cache get supertype if ctce null class type cache put supertype ctce new class type cache entry if ctce subtypes null ctce subtypes new identity hash set ctce subtypes add subtype
internally used to register a subtype link
protected void remove subtype class type subtype class type supertype program model info pmi supertype get program model info if pmi this default program model info pmi register subtype subtype supertype class type cache entry ctce class type cache entry class type cache get supertype if ctce null if ctce subtypes null ctce subtypes remove subtype
internally used to remove a subtype link
public void remove change history listener change history listener chl synchronized change listeners for int i change listeners length 1 i 0 i 1 if change listeners i chl change history listener new listeners new change history listener change listeners length 1 if i 0 system arraycopy change listeners 0 new listeners 0 i if i change listeners length 1 system arraycopy change listeners i 1 new listeners i change listeners length 1 i change listeners new listeners break
removes a change history listener from the history
public binary not create binary not return new binary not
creates a new
public void add model update listener model update listener l synchronized update listeners model update listener new listeners new model update listener update listeners length 1 system arraycopy update listeners 0 new listeners 0 update listeners length new listeners update listeners length l update listeners new listeners
adds a model update listener to the history
private void compute all supertypes class type ct class type cache entry ctce ctce all supertypes new super type top sort get all types ct
internal method to compute all superclasses of a class
public void remove model update listener model update listener l synchronized update listeners for int i update listeners length 1 i 0 i 1 if update listeners i l model update listener new listeners new model update listener update listeners length 1 if i 0 system arraycopy update listeners 0 new listeners 0 i if i update listeners length 1 system arraycopy update listeners i 1 new listeners i update listeners length 1 i update listeners new listeners break
removes a model update listener from the history
public binary not create binary not expression child return new binary not child
creates a new
public void attached program element root debug asserta root debug asserta root get astparent null root instanceof compilation unit attach change ac new attach change root enqueue change ac to the update queue push change ac to the transformation sequence stack if debug if root instanceof compilation unit root root get astparent program element orphan misc kit check parent links root if orphan null debug log orphan detected format to string formats element long orphan in call from n debug make stack trace
informs the change history of the addition of a new subtree
public declared type list get all types class type ct update model program model info pmi ct get program model info if pmi this debug asserta pmi return pmi get all types ct class type cache entry ctce class type cache entry class type cache get ct if ctce null class type cache put ct ctce new class type cache entry if ctce all member types null compute all member types ct ctce return ctce all member types
returns all types declared and visible in the class type
public binary or create binary or return new binary or
creates a new
public void detached program element root int pos detached root root get astparent pos
informs the change history of the deletion of a subtree
private void enqueue change tree change tc change list add tc if debug debug log tc to string tree change duplicate tree change root2change put tc get change root tc if duplicate null check conflict duplicate tc needs update true
stores the current tree change
public binary or create binary or expression lhs expression rhs return new binary or lhs rhs
creates a new
private tree change get tail change int s change list size return s 0 null change list get tree change s 1
returns the last change from the update queue or null if the
private void remove tail change int s change list size tree change tc change list get tree change s 1 if debug debug log suppressing tc root2change remove tc get change root change list remove s 1 if s 1 needs update false
removes the last change from the update queue
private void normalize for int i 0 s change list size i s i 1 tree change tc change list get tree change i there are no duplicates of roots by construction except certain detach attach combinations program element current tc get change root non terminal program element parent tc get change root parent while parent null current parent if root2change contains key current tc set minor true current unit kit get compilation unit current break parent parent get astparent tc set compilation unit compilation unit current
locates and marks minor changes
public binary or assignment create binary or assignment return new binary or assignment
creates a new
protected declared type get outermost type declared type t declared type c t declared type container cc t get container while cc null cc instanceof class type c class type cc cc class type cc get container return c
returns the outermost type of a given type
public void begin transformation transformation if debug debug log begin transformation to string push transformation
reports the start of a new transformation
public binary or assignment create binary or assignment expression lhs expression rhs return new binary or assignment lhs rhs
creates a new
private int locate transformation transformation int position report count while position 0 position 1 if report stack position transformation break return position
returns the internal index of the given transformation or
public binary xor create binary xor return new binary xor
creates a new
public void rollback rollback 0
removes all transformations in the stack and reverts all
public boolean is reported transformation transformation return locate transformation 0
checks if the given transformation is reported in this history
public binary xor create binary xor expression lhs expression rhs return new binary xor lhs rhs
creates a new
public void commit while report count 0 report stack report count null if debug debug log committing
flushes all transformation sequences making them irreversible
public type get return type delegate d return null
this method shall never be called
public type list get signature delegate d return null
this method shall never be called
public type get base type enum e return null
this method shall never be called
public enum member list get fields enum e return null
this method shall never be called
public boolean is minor return is minor
checks if this change is included in a bigger one and
public string get missing class file name return missing class
returns the program element that could not be resolved
protected int get error count return error count
returns the current error count
protected boolean is refering unavailable code model element me return false
redefine this method to indicate that the specified element
protected boolean is template code program element pe return false
redefine this method to indicate that the specified element
protected boolean is ignorable exception e if e instanceof unresolved reference exception program element unresolved reference unresolved reference exception e get unresolved reference if is refering unavailable code unresolved reference return true if is template code unresolved reference return true else if e instanceof typing exception return true return false
redefine this method to filter exceptions that are not
protected void warning message exception e string class name e get class get name class name class name substring class name last index of 1 system err println warning class name system err println e get message system err println
issues a warning message when the specified exception is ignored
protected void error message exception e string class name e get class get name class name class name substring class name last index of 1 system err println error count class name system err println e get message system err println
issues an error message when the specified exception is not ignored
protected void exit action string msg error count errors have occured aborting system err println msg throw new model exception msg
called when too many errors occurred or the model update has
public type get compile time constant type expression expr constant evaluator evaluation result res new constant evaluator evaluation result if is compile time constant expr res return null return res get primitive type get name info
returns the type of a constant expression if it is a compile time
public tree change list get changes return change list
returns the series of changes
public binary xor assignment create binary xor assignment return new binary xor assignment
creates a new
public void initialize service configuration cfg super initialize cfg create null type null type new null type cfg get implicit element info create system namespace create namespace system add a listener for the project settings change cfg get project settings add property change listener this update search mode
initialize with a given service configuration
public boolean is compile time constant expression expr return is compile time constant expr new constant evaluator evaluation result
checks if the given expression is a compile time constant as defined
public void property change property change event evt string changed prop evt get property name if changed prop equals property names class search mode update search mode
listener for property changes in the project settings
private void update search mode string prop service configuration get project settings get property property names class search mode if prop null just in case prop search mode new int prop length for int i 0 i search mode length i switch prop char at i case s case s search mode i search source break case c case c search mode i search class break case r case r search mode i search reflect break default search mode i no search
parses the class search mode property and creates the internal
private primitive type create primitive type string name string boxname primitive type res new primitive type name boxname get implicit element info name2type put res get name res return res
creates and initializes a new primitive type with the given name
public void register declared type ct debug asserta ct string name ct get full name object ob name2type put name ct if ob null ob ct debug log internal warning multiple registration of format to string n i ct format to string was n i program model element ob
registers a class type into the type map
public class type get system object if system object null system object get class type system object return system object
returns the cache object of the system
public class type get system string if system string null system string get class type system string return system string
returns the cache object of the system
public type get system array if system array null system array get class type system array return system array
returns the cache object of the system
public class type get system type if system type null system type get class type system type return system type
returns the cache object of the system
public conditional create conditional return new conditional
creates a new
public copy assignment create copy assignment return new copy assignment
creates a new
public primitive type get sbyte type return sbyte type
returns the sbyte type
public primitive type get uint type return uint type
returns the uint type
public primitive type get ulong type return ulong type
returns the ulong type
public copy assignment create copy assignment expression lhs expression rhs return new copy assignment lhs rhs
creates a new
public primitive type get ushort type return ushort type
returns the ushort type
public primitive type get decimal type return decimal type
returns the decimal type
public divide create divide return new divide
creates a new
public namespace create namespace string name namespace result namespace name2namespace get name if result null result new namespace name service configuration get implicit element info name2namespace put result get name result int ldp name last index of if ldp 0 create namespace name substring 0 ldp return result
creates a new namespace from the given name
public divide create divide expression lhs expression rhs return new divide lhs rhs
creates a new
public array type create array type type basetype int dimension string aname multidim array utils append dimensions basetype get full name dimension array type result array type name2type get aname if result null result new array type basetype service configuration get implicit element info dimension name2type put result get full name result return result
creates a new multidimensional array type with the given basetype
public divide assignment create divide assignment return new divide assignment
creates a new
public array type create array type type basetype int dims debug asserta dims length 0 array type result create array type basetype dims 0 for int i 1 i dims length i result create array type result dims i return result
creates an array type with the specified dimensions
public array type get array type type basetype int dimension debug asserta basetype update model string aname multidim array utils append dimensions basetype get full name dimension return array type name2type get aname
returns the array type with the specified base type and dimension
public divide assignment create divide assignment expression lhs expression rhs return new divide assignment lhs rhs
creates a new
public equals create equals return new equals
creates a new
public equals create equals expression lhs expression rhs return new equals lhs rhs
creates a new
public greater or equals create greater or equals return new greater or equals
creates a new
public greater or equals create greater or equals expression lhs expression rhs return new greater or equals lhs rhs
creates a new
public greater than create greater than return new greater than
creates a new
public greater than create greater than expression lhs expression rhs return new greater than lhs rhs
creates a new
public instanceof create instanceof return new instanceof
creates a new
public instanceof create instanceof expression child type reference typeref return new instanceof child typeref
creates a new
public less or equals create less or equals return new less or equals
creates a new
public less or equals create less or equals expression lhs expression rhs return new less or equals lhs rhs
creates a new