315. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:46 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

315.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\Log4JEncryption\main\test\java\gov\va\med\log4j\encrypting TestEncryptingPatternLayout.java Mon Dec 4 21:34:28 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\Log4JEncryption\main\test\java\gov\va\med\log4j\encrypting TestEncryptingPatternLayout.java Tue Dec 5 13:25:18 2017 UTC

315.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 240
Changed 2 4
Inserted 0 0
Removed 0 0

315.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

315.4 Active regular expressions

No regular expressions were active.

315.5 Comparison detail

  1   /**
  2    * Per VHA  Directive  2004-038,  this rout ine should  not be mo dified.
  3    * Propert y of the U S Governme nt.  No pe rmission t o copy or  redistribu te this so ftware is  given. 
  4    * Use of  unreleased  versions  of this so ftware req uires the  user to ex ecute a wr itten agre ement 
  5    * with th e VistA Im aging Nati onal Proje ct Office  of the Dep artment of  Veterans  Affairs.  
  6    * Please  contact th e National  Service D esk at  PHONE  or  PII                      in order t
  7    * reach t he VistA I maging Nat ional Proj ect office .
  8    * 
  9    * The Foo d and Drug  Administr ation clas sifies thi s software  as a medi cal device .  As such , it 
  10    * may not  be change d in any w ay.  Modif ications t o this sof tware may  result in  an adulter ated 
  11    * medical  device un der 21CFR,  the use o f which is  considere d to be a  violation  of US Fede ral Statut es.
  12    * 
  13    * Federal  law restr icts this  device to  use by or  on the ord er of eith er a licen sed practi tioner or  persons 
  14    * lawfull y engaged  in the man ufacture,  support, o r distribu tion of th e product.
  15    * 
  16    * Created : Mar 8, 2 012
  17    * Author:         
BECKEC
  18    */
  19   package go v.va.med.l og4j.encry pting;
  20  
  21   import gov .va.med.lo g4j.encryp tion.Encry ptingPatte rnLayout;
  22  
  23   import jav a.util.reg ex.Matcher ;
  24  
  25   import org .apache.lo gging.log4 j.LogManag er;
  26   import org .apache.lo gging.log4 j.Logger;
  27  
  28   import jun it.framewo rk.TestCas e;
  29  
  30   public cla ss TestEnc ryptingPat ternLayout  extends T estCase
  31   {
  32           pr ivate Logg er logger;
  33           
  34           @O verride
  35           pr otected vo id setUp()  
  36           th rows Excep tion
  37           {
  38                    supe r.setUp();
  39                    this .logger =  LogManager .getLogger (this.getC lass());
  40           }
  41  
  42           pu blic void  testParame terSetting ()
  43           {
  44                    this .logger.wa rn("Hello  World");
  45           }
  46           
  47           pu blic void  testNullMe ssage()
  48           {
  49                    this .logger.wa rn("null") ;
  50           }
  51           
  52           pu blic void  testFieldF inderRegex ()
  53           {
  54                    Matc her fieldM atcher; 
  55                             
  56                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%d {DATE} %5p  [%t] (%F: %L) - %{de s}m%n");
  57                    fiel dMatcher.f ind();
  58                    asse rtEquals(  "%{des}m",  fieldMatc her.group( ));
  59                    
  60                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%d {DATE} %5{ des}p [%{6 55321}t] ( %F:%L) - % {des}m%n") ;
  61                    fiel dMatcher.f ind();
  62                    asse rtEquals(  "%5{des}p" , fieldMat cher.group ());
  63                    fiel dMatcher.f ind();
  64                    asse rtEquals(  "%{655321} t", fieldM atcher.gro up());
  65                    fiel dMatcher.f ind();
  66                    asse rtEquals(  "%{des}m",  fieldMatc her.group( ));
  67           }
  68           
  69           pu blic void  testFieldP arserRegex ()
  70           {
  71                    Matc her fieldM atcher; 
  72                             
  73                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%{ des}m");
  74                    asse rtTrue(fie ldMatcher. toString() , fieldMat cher.match es());
  75                    asse rtEquals(  "", fieldM atcher.gro up(Encrypt ingPattern Layout.TAB BING_GROUP ) );
  76                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.N EGATION_GR OUP) );
  77                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.F RACTIONAL_ GROUP) );
  78                    asse rtEquals(  "{des}", f ieldMatche r.group(En cryptingPa tternLayou t.ENCRYPTI ON_GROUP)  );
  79                    asse rtEquals(  "m", field Matcher.gr oup(Encryp tingPatter nLayout.FI ELD_GROUP)  );
  80                    
  81                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%{ 655321}m") ;
  82                    asse rtTrue(fie ldMatcher. toString() , fieldMat cher.match es());
  83                    asse rtEquals(  "", fieldM atcher.gro up(Encrypt ingPattern Layout.TAB BING_GROUP ) );
  84                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.N EGATION_GR OUP) );
  85                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.F RACTIONAL_ GROUP) );
  86                    asse rtEquals(  "{655321}" , fieldMat cher.group (Encryptin gPatternLa yout.ENCRY PTION_GROU P) );
  87                    asse rtEquals(  "m", field Matcher.gr oup(Encryp tingPatter nLayout.FI ELD_GROUP)  );
  88                    
  89                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%6 {655321}m" );
  90                    asse rtTrue(fie ldMatcher. toString() , fieldMat cher.match es());
  91                    asse rtEquals(  "6", field Matcher.gr oup(Encryp tingPatter nLayout.TA BBING_GROU P) );
  92                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.N EGATION_GR OUP) );
  93                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.F RACTIONAL_ GROUP) );
  94                    asse rtEquals(  "{655321}" , fieldMat cher.group (Encryptin gPatternLa yout.ENCRY PTION_GROU P) );
  95                    asse rtEquals(  "m", field Matcher.gr oup(Encryp tingPatter nLayout.FI ELD_GROUP)  );
  96                    
  97                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%- 6{655321}m ");
  98                    asse rtTrue(fie ldMatcher. toString() , fieldMat cher.match es());
  99                    asse rtEquals(  "-6", fiel dMatcher.g roup(Encry ptingPatte rnLayout.T ABBING_GRO UP) );
  100                    asse rtEquals(  "-", field Matcher.gr oup(Encryp tingPatter nLayout.NE GATION_GRO UP) );
  101                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.F RACTIONAL_ GROUP) );
  102                    asse rtEquals(  "{655321}" , fieldMat cher.group (Encryptin gPatternLa yout.ENCRY PTION_GROU P) );
  103                    asse rtEquals(  "m", field Matcher.gr oup(Encryp tingPatter nLayout.FI ELD_GROUP)  );
  104                    
  105                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%6 .5{655321} m");
  106                    asse rtTrue(fie ldMatcher. toString() , fieldMat cher.match es());
  107                    asse rtEquals(  "6.5", fie ldMatcher. group(Encr yptingPatt ernLayout. TABBING_GR OUP) );
  108                    asse rtEquals(  null, fiel dMatcher.g roup(Encry ptingPatte rnLayout.N EGATION_GR OUP) );
  109                    asse rtEquals(  ".5", fiel dMatcher.g roup(Encry ptingPatte rnLayout.F RACTIONAL_ GROUP) );
  110                    asse rtEquals(  "{655321}" , fieldMat cher.group (Encryptin gPatternLa yout.ENCRY PTION_GROU P) );
  111                    asse rtEquals(  "m", field Matcher.gr oup(Encryp tingPatter nLayout.FI ELD_GROUP)  );
  112  
  113                    fiel dMatcher =  Encryptin gPatternLa yout.FIELD _PATTERN.m atcher("%- 6.5{655321 }m");
  114                    asse rtTrue(fie ldMatcher. toString() , fieldMat cher.match es());
  115                    asse rtEquals(  "-6.5", fi eldMatcher .group(Enc ryptingPat ternLayout .TABBING_G ROUP) );
  116                    asse rtEquals(  "-", field Matcher.gr oup(Encryp tingPatter nLayout.NE GATION_GRO UP) );
  117                    asse rtEquals(  ".5", fiel dMatcher.g roup(Encry ptingPatte rnLayout.F RACTIONAL_ GROUP) );
  118                    asse rtEquals(  "{655321}" , fieldMat cher.group (Encryptin gPatternLa yout.ENCRY PTION_GROU P) );
  119                    asse rtEquals(  "m", field Matcher.gr oup(Encryp tingPatter nLayout.FI ELD_GROUP)  );
  120  
  121           }
  122   }