Program: 134446
Project: 134446
Buggy source:
@Override public synchronized Object intercept(Object object,Method method,Object[] args,MethodProxy methodProxy) throws Throwable {
  FunctionalPart<?> funcPart=(FunctionalPart<?>)object;
  long timeOut=0;
  TimeUnit timeUnit=null;
  boolean timeOutIsChanged=false;
  if (method.isAnnotationPresent(InteractiveMethod.class)) {
    funcPart.switchToMe();
    timeOut=funcPart.getTimeOut().getImplicitlyWaitTimeOut();
    timeUnit=funcPart.getTimeOut().getImplicitlyWaitTimeUnit();
    funcPart.getDefaultFieldDecorator().resetImplicitlyWaitTimeOut(timeOut,timeUnit);
    if (method.isAnnotationPresent(WithImplicitlyWait.class)) {
      WithImplicitlyWait withImplicitlyWait=method.getAnnotation(WithImplicitlyWait.class);
      long customTimeOut=withImplicitlyWait.timeOut();
      TimeUnit customTimeUnit=withImplicitlyWait.timeUnit();
      resetTimeOut(funcPart,customTimeOut,customTimeUnit);
      timeOutIsChanged=true;
    }
  }
  try {
    if (method.getName().equals(DecompositionUtil.GET_PART)) {
      Class<?> target=DecompositionUtil.extractTargetFromGetPart(method,args);
      ESupportedDrivers supportedDriver=funcPart.getWebDriverEncapsulation().getInstantiatedSupportedDriver();
      Object[] newArgs=DecompositionUtil.getRelevantArgs(supportedDriver,method,args,target);
      args=newArgs;
      method=MethodReadingUtil.getSuitableMethod(funcPart.getClass(),DecompositionUtil.GET_PART,args);
      methodProxy=MethodReadingUtil.getMethodProxy(funcPart.getClass(),method);
    }
    return super.intercept(funcPart,method,args,methodProxy);
  }
 catch (  Exception e) {
    throw e;
  }
 finally {
    if (timeOutIsChanged)     resetTimeOut(funcPart,timeOut,timeUnit);
  }
}

Fixed version (ground truth):
@Override public synchronized Object intercept(Object object,Method method,Object[] args,MethodProxy methodProxy) throws Throwable {
  FunctionalPart<?> funcPart=(FunctionalPart<?>)object;
  long timeOut=0;
  TimeUnit timeUnit=null;
  boolean timeOutIsChanged=false;
  if (method.isAnnotationPresent(InteractiveMethod.class)) {
    funcPart.switchToMe();
    timeOut=funcPart.getTimeOut().getImplicitlyWaitTimeOut();
    timeUnit=funcPart.getTimeOut().getImplicitlyWaitTimeUnit();
    if (funcPart.defaultFieldDecorator != null)     funcPart.defaultFieldDecorator.resetImplicitlyWaitTimeOut(timeOut,timeUnit);
    if (method.isAnnotationPresent(WithImplicitlyWait.class)) {
      WithImplicitlyWait withImplicitlyWait=method.getAnnotation(WithImplicitlyWait.class);
      long customTimeOut=withImplicitlyWait.timeOut();
      TimeUnit customTimeUnit=withImplicitlyWait.timeUnit();
      resetTimeOut(funcPart,customTimeOut,customTimeUnit);
      timeOutIsChanged=true;
    }
  }
  try {
    if (method.getName().equals(DecompositionUtil.GET_PART)) {
      Class<?> target=DecompositionUtil.extractTargetFromGetPart(method,args);
      ESupportedDrivers supportedDriver=funcPart.getWebDriverEncapsulation().getInstantiatedSupportedDriver();
      Object[] newArgs=DecompositionUtil.getRelevantArgs(supportedDriver,method,args,target);
      args=newArgs;
      method=MethodReadingUtil.getSuitableMethod(funcPart.getClass(),DecompositionUtil.GET_PART,args);
      methodProxy=MethodReadingUtil.getMethodProxy(funcPart.getClass(),method);
    }
    return super.intercept(funcPart,method,args,methodProxy);
  }
 catch (  Exception e) {
    throw e;
  }
 finally {
    if (timeOutIsChanged)     resetTimeOut(funcPart,timeOut,timeUnit);
  }
}