Source:
<code>ResourceInformationReflector(String resourceClassName, String resourceInfoClassName) { Method resourceSetResourceInformationMethod = null; Method resourceGetResourcesMethod = null; Method resourceInformationGetNameMethod = null; Method resourceInformationGetValueMethod = null; Method resourceInformationNewInstanceMethod = null; boolean isYarnResourceTypesAvailable = false; try { final Class<?> resourceClass = Class.forName(resourceClassName); final Class<?> resourceInfoClass = Class.forName(resourceInfoClassName); resourceSetResourceInformationMethod = resourceClass.getMethod("setResourceInformation", String.class, resourceInfoClass); resourceGetResourcesMethod = resourceClass.getMethod("getResources"); resourceInformationGetNameMethod = resourceInfoClass.getMethod("getName"); resourceInformationGetValueMethod = resourceInfoClass.getMethod("getValue"); resourceInformationNewInstanceMethod = resourceInfoClass.getMethod("newInstance", String.class, long.class); isYarnResourceTypesAvailable = true; } catch (Exception e) { <START> LOG.debug("The underlying Yarn does not support external resource.", e); <END> } finally { this.resourceSetResourceInformationMethod = resourceSetResourceInformationMethod; this.resourceGetResourcesMethod = resourceGetResourcesMethod; this.resourceInformationGetNameMethod = resourceInformationGetNameMethod; this.resourceInformationGetValueMethod = resourceInformationGetValueMethod; this.resourceInformationNewInstanceMethod = resourceInformationNewInstanceMethod; this.isYarnResourceTypesAvailable = isYarnResourceTypesAvailable; } }</code><technical_language>suggestion LOG.debug("The underlying Yarn version support external resources.", e);</technical_language>

Target:
ResourceInformationReflector(String resourceClassName, String resourceInfoClassName) { Method resourceSetResourceInformationMethod = null; Method resourceGetResourcesMethod = null; Method resourceInformationGetNameMethod = null; Method resourceInformationGetValueMethod = null; Method resourceInformationNewInstanceMethod = null; boolean isYarnResourceTypesAvailable = false; try { final Class<?> resourceClass = Class.forName(resourceClassName); final Class<?> resourceInfoClass = Class.forName(resourceInfoClassName); resourceSetResourceInformationMethod = resourceClass.getMethod("setResourceInformation", String.class, resourceInfoClass); resourceGetResourcesMethod = resourceClass.getMethod("getResources"); resourceInformationGetNameMethod = resourceInfoClass.getMethod("getName"); resourceInformationGetValueMethod = resourceInfoClass.getMethod("getValue"); resourceInformationNewInstanceMethod = resourceInfoClass.getMethod("newInstance", String.class, long.class); isYarnResourceTypesAvailable = true; } catch (Exception e) { LOG.debug("The underlying Yarn version does not support external resources.", e); } finally { this.resourceSetResourceInformationMethod = resourceSetResourceInformationMethod; this.resourceGetResourcesMethod = resourceGetResourcesMethod; this.resourceInformationGetNameMethod = resourceInformationGetNameMethod; this.resourceInformationGetValueMethod = resourceInformationGetValueMethod; this.resourceInformationNewInstanceMethod = resourceInformationNewInstanceMethod; this.isYarnResourceTypesAvailable = isYarnResourceTypesAvailable; } }