SandMark version 2.0


sandmark.watermark.renamefieldsmethods
Class RenameFieldsMethods

java.lang.Object
  |
  +--sandmark.Algorithm
        |
        +--sandmark.watermark.GeneralWatermarker
              |
              +--sandmark.watermark.StaticWatermarker
                    |
                    +--sandmark.watermark.renamefieldsmethods.RenameFieldsMethods

public class RenameFieldsMethods
extends StaticWatermarker

This algorithm embeds a watermark within the method names of the user's program.

Author:
Martin Stepp ( stepp@cs.arizona.edu) and Kelly Heffner (kheffner@cs.arizona.edu)

Nested Class Summary
(package private)  class RenameFieldsMethods.Recognizer
          This class is an iterator which generates the watermarks found in the program.
 
Field Summary
(package private) static ConfigProperties configProps
           
(package private) static java.lang.String[][] props
           
 
Constructor Summary
RenameFieldsMethods()
          Constructs a watermarker.
 
Method Summary
 void embed(ClassFileCollection cfc, java.util.jar.JarOutputStream output, java.util.Properties props)
          Embed a watermark value into the program.
 java.lang.String getAlgHTML()
          Gets the HTML codes of the About page.
 java.lang.String getAlgURL()
          Gets the URL of the Help page
 java.lang.String getAuthor()
          Specifies the author of this algorithm.
 java.lang.String getAuthorEmail()
          Specifies the author's email address.
 ConfigProperties getConfigProperties()
          Gets the properties of RenameFieldsMethods algorithm
 java.lang.String getDescription()
          Specifies what this algorithm does.
 java.lang.String getLongName()
          Returns this watermarker's long name.
 ModificationProperty[] getMutations()
          Returns a list of the changes that this algorithm makes to the code.
 RequisiteProperty[] getPostprohibited()
          Specifies a list of properties of algorithms that cannot be run on the target code after this algorithm is run.
 java.lang.String getShortName()
          Returns this watermarker's short name.
 java.util.Iterator recognize(java.util.Properties props)
           
 void setConfigProperties(ConfigProperties props)
          Sets the ConfigProperties object which specifies the parameters for this run of the algorithm.
 
Methods inherited from class sandmark.watermark.StaticWatermarker
getAboutHTML, getHelpURL, getProperties, setProperties
 
Methods inherited from class sandmark.Algorithm
getPostrequisites, getPostsuggestions, getPreprohibited, getPrerequisites, getPresuggestions, getReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

static java.lang.String[][] props

configProps

static ConfigProperties configProps
Constructor Detail

RenameFieldsMethods

public RenameFieldsMethods()
Constructs a watermarker.

Method Detail

getShortName

public java.lang.String getShortName()
Returns this watermarker's short name.

Specified by:
getShortName in class Algorithm
Returns:
the short name for this watermark

getLongName

public java.lang.String getLongName()
Returns this watermarker's long name.

Specified by:
getLongName in class Algorithm
Returns:
the long name for this algorithm

getConfigProperties

public ConfigProperties getConfigProperties()
Gets the properties of RenameFieldsMethods algorithm

Specified by:
getConfigProperties in class Algorithm
Returns:
the parameters for this run of the algorithm

setConfigProperties

public void setConfigProperties(ConfigProperties props)
Description copied from class: Algorithm
Sets the ConfigProperties object which specifies the parameters for this run of the algorithm.

Specified by:
setConfigProperties in class Algorithm
Parameters:
props - the parameters for this run of the algorithm

getAlgHTML

public java.lang.String getAlgHTML()
Gets the HTML codes of the About page.

Specified by:
getAlgHTML in class Algorithm
Returns:
an HTML formatted description of what the algorithm does.

getAlgURL

public java.lang.String getAlgURL()
Gets the URL of the Help page

Specified by:
getAlgURL in class Algorithm
Returns:
a URL to the help.html file for the algorithm

getAuthor

public java.lang.String getAuthor()
Specifies the author of this algorithm.

Overrides:
getAuthor in class Algorithm
Returns:
the name of the author of the algorithm

getAuthorEmail

public java.lang.String getAuthorEmail()
Specifies the author's email address.

Overrides:
getAuthorEmail in class Algorithm
Returns:
the email address of the author of the algorithm

getDescription

public java.lang.String getDescription()
Specifies what this algorithm does.

Overrides:
getDescription in class Algorithm
Returns:
a brief description of the algorithm

getMutations

public ModificationProperty[] getMutations()
Returns a list of the changes that this algorithm makes to the code.

Overrides:
getMutations in class Algorithm
Returns:
a list of mutations that this algorithm may do on the code

getPostprohibited

public RequisiteProperty[] getPostprohibited()
Description copied from class: Algorithm
Specifies a list of properties of algorithms that cannot be run on the target code after this algorithm is run. See RequisiteProperty for more details. This method should only be overridden if there is a nonempty set of prohibited algorithms.

Overrides:
getPostprohibited in class Algorithm
Returns:
a list of prohibited algorithms to run after this algorithm

embed

public void embed(ClassFileCollection cfc,
                  java.util.jar.JarOutputStream output,
                  java.util.Properties props)
           throws WatermarkingException,
                  java.io.IOException
Embed a watermark value into the program. The props argument holds at least the following properties:

Specified by:
embed in class StaticWatermarker
WatermarkingException
java.io.IOException

recognize

public java.util.Iterator recognize(java.util.Properties props)
                             throws WatermarkingException,
                                    java.io.IOException
Specified by:
recognize in class StaticWatermarker
WatermarkingException
java.io.IOException

SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002