input
stringlengths
10
828
output
stringlengths
5
107
public void visit new modifier new modifier new modifier
method visit new modifier
protected void set int index object element if index count throw new array index out of bounds exception index array index element
overwrites an element at the given position
public this constructor reference create this constructor reference return new this constructor reference
creates a new
public void visit using alias using alias using alias
method visit using alias
public void visit foreach foreach foreach
method visit foreach
public this constructor reference create this constructor reference expression mutable list arguments return new this constructor reference arguments
creates a new
public void visit constant field declaration constant field declaration constant field declaration
method visit constant field declaration
public void flush caches dir contents clear known dirs clear not found clear
empties the caches of this service
public int add string path str int result 0 if path str null string paths string utils split path str file path separator char result paths length for int i 0 i result i string path paths i trim if path equals add path path not found clear clear the buffer of illegal requests return result
adds the given paths to the list
protected set get contents file directory mutable set result mutable set dir contents get directory if result null dir contents put directory result new natural hash set string list null list directory list for int i 0 i list length i result add list i return result
returns a set of file names in the given directory
public void visit local constant declaration local constant declaration local constant declaration
method visit local constant declaration
public data location find string relative name data location result data location locations get relative name if result null not found contains relative name for int i 0 result null i paths size i result get location paths get object i relative name if result null locations put relative name result else not found add relative name return result
looks for the file with the given relative file name
public string get relative name string absolute filename for int i 0 i paths size i object o paths get object i if o instanceof file file p file o if p is directory string pathfilename p get absolute path if absolute filename starts with pathfilename int pathfilenamelen pathfilename length if absolute filename length pathfilenamelen return if pathfilename char at pathfilenamelen 1 file separator char pathfilenamelen 1 cut one more return absolute filename substring pathfilenamelen return absolute filename
returns a relative name of the given absolute file name removing
public string to string string result if paths is empty result else string buffer sb new string buffer for int i 0 i paths size i sb append file path separator char object f paths get object i if f instanceof zip file sb append zip file f get name else sb append file f get path result sb to string substring 1 return result
returns the string representation of the path list
public void visit enum member declaration enum member declaration enum member declaration
method visit enum member declaration
public this reference create this reference return new this reference
creates a new
public string set property string key string value string old value properties get property key if old value value if input path equals key value normalize search path value search path list new path list value else if error threshold equals key if error handler null error handler set error threshold integer parse int value properties put key value changes fire property change key old value value return old value
defines a property with the given name and value and
public void visit method group reference method group reference method group reference
method visit method group reference
public string get default property string key return defaults get property key
returns the default property with the given name
private string normalize search path string pathlist if pathlist null return null mutable set already existing new natural hash set string buffer newpathlist new string buffer string tokenizer paths new string tokenizer pathlist file path separator boolean first token true while paths has more tokens string single path paths next token if already existing contains single path new file single path exists if first token newpathlist append file path separator newpathlist append single path already existing add single path first token false pathlist newpathlist to string return pathlist
gets the current input path removes all paths that do not
public boolean ensure system classes are in path class file repository cfr service configuration get class file repository if cfr find class file java lang object null return true file archive file utils get path of system classes if archive null archive new file string classes archive get path string oldpath get property input path if oldpath length 0 oldpath set property input path oldpath file path separator classes return cfr find class file java lang object null return true
todo temporary hack
public void visit property specification property specification property specification
method visit property specification
public path list get search path list return search path list
returns the current shared search path list
public this reference create this reference type reference outer return new this reference outer
creates a new
public error handler get error handler if error handler null set error handler null return error handler
returns the current error handler
public void set error handler error handler handler if handler null handler new default error handler integer parse int get property error threshold if handler error handler if error handler null service configuration get change history remove model update listener handler error handler handler service configuration get change history add model update listener error handler
sets the current error handler and registers it as a change update
public void visit event specification event specification event specification
method visit event specification
public string get type return location type file
returns a string representation of the location type
public string to string return get type file get path
returns a url like string representation of the location in the form
public boolean has reader support return true
determines whether the data source provides a reader interface
public input stream get input stream throws ioexception return new buffered input stream new file input stream file
returns an input stream for the content of the location
public void input stream closed nothing to do
tells the location that the earlier created input stream has been closed
public reader get reader throws ioexception return new file reader file
returns a reader for the according data content
public void reader closed nothing to do
tells the location that the earlier created reader has been closed
public boolean is writable return true
determines whether or not the data location can be overwritten
public boolean has writer support return true
determines whether the data source provides a writer interface
public void output stream closed nothing to do
tells the location that the earlier created output stream has been closed
public writer get writer throws ioexception return new file writer file
returns a writer for the according data content
public void visit delegate call reference delegate call reference delegate call reference
method visit delegate call reference
public void writer closed nothing to do
tells the location that the earlier created writer has been closed
public file get project file return file
returns the project file assigned
public void visit uncollated method call reference uncollated method call reference uncollated method call reference
method visit uncollated method call reference
public variable reference create variable reference return new variable reference
creates a new
public void visit verbatim string literal verbatim string literal verbatim string literal visit string literal verbatim string literal
method visit verbatim string literal
public string get type return location type archive
returns the type of the data location
public zip file get file return archive file
returns the zip file of this archive
public string to string return get type archive file get name item name
returns a url like string representation of the location in the form
public input stream get input stream throws ioexception input stream result null zip entry ze archive file get entry item name result new buffered input stream archive file get input stream ze return result
returns an input stream that can be used to read the archive
public void input stream closed
tells the location that the earlier created input stream has been closed
public reader get reader throws ioexception return new input stream reader get input stream
returns a reader for the according data content
public void reader closed input stream closed
tells the location that the earlier created reader has been closed
public boolean is writable return false
returns false since archives do not provide writa access
public boolean has writer support return false
returns false since archives do not even provide writa access
public void output stream closed nothing to do since this cannot happen
tells the location that the earlier created output stream has been closed
public void writer closed nothing to do since this cannot happen
tells the location that the earlier created writer has been closed
private boolean is part of unit name program element pe if pe instanceof identifier pe instanceof namespace reference return is part of unit name pe get astparent if pe instanceof namespace specification return true if pe instanceof type declaration non terminal program element parent pe get astparent return parent instanceof compilation unit compilation unit parent get primary type declaration pe return false
check if the given program element can influence on the canonical
public type get base type return basetype
returns the base type of this array type
public variable reference create variable reference identifier id return new variable reference id
creates a new
public string get name return short name
returns the name of this array type
public program model info get program model info return pmi
returns the instance that can retrieve information about this
public void set program model info program model info service this pmi service
sets the instance that can retrieve information about this
public program model info get program model info return service
returns the instance that can retrieve information about this
public void set program model info program model info service this service service
sets the instance that can retrieve information about this
public boolean is sealed return false
checks if this member is final
public data location find source file string classname in c this possible optimzation cache it string file naming dot naming make filename classname java return get search path list find file return null
searches for the location of the source file for the given class
public boolean is private return false
checks if this member is private
public boolean is protected return false
checks if this member is protected
public boolean is public return owner delegate is public else it is package visible
checks if this member is public
public boolean is extern return false
checks if this member is native
public class type get containing class type return null
returns the logical parent class of this member
public type get return type return service get return type this
returns the return type of this method
public type list get signature return service get signature this
returns the empty signature of this constructor
public class type list get exceptions return service get exceptions this
returns the empty exception list of this constructor
public namespace get namespace return service get namespace this
returns the package this element is defined in
public string get name return owner delegate get name
returns the name of this element
public string get full name return naming get full name this
returns the maximal expanded name including all applicable
public array length reference create array length reference return new array length reference
creates a new
public string get full name return null
returns the name of this element
public void set program model info program model info info pmi info
sets the instance that can retrieve information about this
public boolean is sealed return true
checks if this member is final
public boolean is public return true
checks if this member is public
public declared type list get declared types return pmi get types this
returns the empty list of class types locally defined within this
public declared type list get all types return pmi get all types this
returns all class types that are inner types of this class type
public class type get containing class type return pmi get containing class type this
returns the logical parent class of this member
public declared type container get container return pmi get declared type container this
returns the enclosing package or class type or method
public class type list get supertypes return pmi get supertypes this
returns the list of locally declared supertypes of this class type
public array length reference create array length reference reference prefix prefix return new array length reference prefix
creates a new
public class type list get all supertypes return pmi get all supertypes this
returns the list of all supertypes of this class type including this
public field list get fields return pmi get fields this
returns the fields locally defined within this class type
public field list get all fields return pmi get all fields this
returns all visible fields that are defined in this class type
public method list get methods return pmi get methods this
returns the methods locally defined within this class type
public constructor list get constructors return pmi get constructors this
returns the constructors locally defined within this class type
public method list get all methods return pmi get all methods this
returns all visible methods that are defined in this class type
public namespace get namespace return pmi get namespace this
returns the package this element is defined in
public string get full name return get name
returns the name of this package
public declared type container get container return null
returns the enclosing package or class type or method
public namespace get namespace return this
returns the enclosing package
private void suck up throws parser exception data location locations get search path list find all csharp filename filter listeners fire progress event 0 locations length importing source files from path for int i 0 i locations length i listeners fire progress event i parsing locations i try suck up compilation unit from location locations i catch throwable e system out println default source file repository suck up parser exception in locations i n system out println e get message e print stack trace system out println continue with next file skipping locations i continue
parses every compilation unit it can find
public string get full name return name
returns the name of type
public type get boxing class debug asserta pmi debug asserta pmi get service configuration debug asserta pmi get service configuration get name info return pmi get service configuration get name info get type boxname
method get boxing class