private void adjustTargetLocation(Target plus,Target star){
  if (plus == null || plus.segment() == null || plus.timing() == -1 || star == null || star.segment() == null || star.timing() == -1)   return;
  Element prosody=(Element)DomUtils.getAncestor(plus.segment(),MaryXML.PROSODY);
  if (prosody == null)   return;
  ProsodicSettings settings=prosodyMap.get(prosody);
  assert settings != null;
  int accentSlope=settings.accentSlope();
  if (accentSlope == 100)   return;
 else   if (accentSlope == 0)   accentSlope=1;
  int plusTime=plus.getTargetTime();
  int starTime=star.getTargetTime();
  if (plusTime == -1 || starTime == -1)   return;
  int distance=starTime - plusTime;
  int newDistance=100 * distance / accentSlope;
  int newPlusTime=starTime - newDistance;
  if (newPlusTime < 0)   newPlusTime=0;
  String oldSegment=plus.segment().getAttribute("p");
  boolean success=plus.setTargetTime(newPlusTime);
  if (success) {
    Log.d(Mary.LOG,"Accent slope: moved \"plus\" target from [" + oldSegment + "] at "+ plusTime+ " ms to ["+ plus.segment().getAttribute("p")+ "] at "+ plus.getTargetTime()+ " ms.");
  }
}

private void adjustTargetLocation ( Target plus , Target star ) { if ( plus == null || plus . segment ( ) == null || plus . timing ( ) == - 1 || star == null || star . segment ( ) == null || star . timing ( ) == - 1 ) return ; Element prosody = ( Element ) DomUtils . getAncestor ( plus . segment ( ) , MaryXML . PROSODY ) ; if ( prosody == null ) return ; ProsodicSettings settings = prosodyMap . get ( prosody ) ; assert settings != null ; int accentSlope = settings . accentSlope ( ) ; if ( accentSlope == 100 ) return ; else if ( accentSlope == 0 ) accentSlope = 1 ; int plusTime = plus . getTargetTime ( ) ; int starTime = star . getTargetTime ( ) ; if ( plusTime == - 1 || starTime == - 1 ) return ; int distance = starTime - plusTime ; int newDistance = 100 * distance / accentSlope ; int newPlusTime = starTime - newDistance ; if ( newPlusTime < 0 ) newPlusTime = 0 ; String oldSegment = plus . segment ( ) . getAttribute ( "p" ) ; boolean success = plus . setTargetTime ( newPlusTime ) ; if ( success ) { Log . d ( Mary . LOG , "Accent slope: moved \"plus\" target from [" + oldSegment + "] at " + plusTime + " ms to [" + plus . segment ( ) . getAttribute ( "p" ) + "] at " + plus . getTargetTime ( ) + " ms." ) ; } }
take into account the maryxml prosody attribute " accent - slope " - - shift the " plus " target relative to the " star " target accordingly . the star target is not moved .
