auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public DiscussionPostsAdapter(Context context, IEdxEnvironment environment) { super(context, R.layout.row_discussion_thread, environment); edx_brand_primary_base = context.getResources().getColor(R.color.edx_brand_primary_base); grey_medium = context.getResources().getColor(R.color.grey_medium); edx_brand_secondary_dark = context.getResources().getColor(R.color.edx_brand_secondary_dark); edx_utility_success_dark = context.getResources().getColor(R.color.edx_success_text); semiBoldFont = ResourcesCompat.getFont(context, R.font.inter_semi_bold); }

Target:
public DiscussionPostsAdapter(Context context, IEdxEnvironment environment) { super(context, R.layout.row_discussion_thread, environment); edx_brand_primary_base = context.getResources().getColor(R.color.edx_brand_primary_base); edx_grayscale_neutral_dark = context.getResources().getColor(R.color.edx_brand_gray_accent); edx_brand_secondary_dark = context.getResources().getColor(R.color.edx_brand_secondary_dark); edx_utility_success_dark = context.getResources().getColor(R.color.edx_success_text); semiBoldFont = ResourcesCompat.getFont(context, R.font.inter_semi_bold); }
Source:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_notification); ButterKnife.bind(this); mNotificationWorkerFragment = (NotificationWorkerFragment) getFragmentManager() .findFragmentByTag(TAG_NOTIFICATION_WORKER_FRAGMENT); initListView(); initDrawer(); toolbar = findViewById(R.id.toolbar); nonotificationtext = (TextView)this.findViewById(R.id.no_notification_text); }

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_notification); ButterKnife.bind(this); mNotificationWorkerFragment = (NotificationWorkerFragment) getFragmentManager() .findFragmentByTag(TAG_NOTIFICATION_WORKER_FRAGMENT); initListView(); initDrawer(); nonotificationtext = (TextView)this.findViewById(R.id.no_notification_text); setPageTitle(); }
Source:
protected Pair<Boolean, EngineFault> runConnectionStorageToDomain(StorageDomain storageDomain, Guid vdsId, int type) { VDS vds = getVdsDao().get(vdsId); if (!isGlusterfsCliInstalled(vds)) { log.error("Coulsn't find glusterfs-cli package on vds (needed for connecting storage domain {}).", vds.getName(), storageDomain.getName()); StorageHelperBase.addMessageToAuditLog(AuditLogType.GLUSTERFS_CLI_PACKAGE_NOT_INSTALLED, null, vds.getName()); return new Pair<>(false, null); } return super.runConnectionStorageToDomain(storageDomain, vdsId, type); }

Target:
protected Pair<Boolean, EngineFault> runConnectionStorageToDomain(StorageDomain storageDomain, Guid vdsId, int type) { VDS vds = getVdsDao().get(vdsId); if (!isGlusterfsCliInstalled(vds)) { log.error("Couldn't find glusterfs-cli package on vds (needed for connecting storage domain {}).", vds.getName(), storageDomain.getName()); StorageHelperBase.addMessageToAuditLog(AuditLogType.GLUSTERFS_CLI_PACKAGE_NOT_INSTALLED, null, vds.getName()); return new Pair<>(false, null); } return super.runConnectionStorageToDomain(storageDomain, vdsId, type); }
Source:
public void setConf(Configuration conf) { super.setConf(conf); timeout = conf.getLong( CommonConfigurationKeys.HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT, CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_DEFAULT); }

Target:
public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { timeout = conf.getTimeDuration( CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_SECS, CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_SECS_DEFAULT, TimeUnit.SECONDS); } }
Source:
private void updateDetails() { issueDetails.getChildren().clear(); TurboIssue issue = guiElement.getIssue(); if (issue.isPullRequest()) { Label icon = new Label(OCTICON_PULL_REQUEST); icon.getStyleClass().addAll("octicon", "issue-pull-request-icon"); issueDetails.getChildren().add(icon); } if (issue.getCommentCount() > 0){ Label commentIcon = new Label(OCTICON_COMMENT); commentIcon.getStyleClass().addAll("octicon", "comments-label-button"); Label commentCount = new Label(Integer.toString(issue.getCommentCount())); if (issuesWithNewComments.contains(issue.getId())) { commentIcon.getStyleClass().add("has-comments"); commentCount.getStyleClass().add("has-comments"); } issueDetails.getChildren().add(commentIcon); issueDetails.getChildren().add(commentCount); } for (TurboLabel label : guiElement.getLabels()) { issueDetails.getChildren().add(label.getNode()); } if (issue.getMilestone().isPresent() && guiElement.getMilestone().isPresent()) { TurboMilestone milestone = guiElement.getMilestone().get(); issueDetails.getChildren().add(new Label(milestone.getTitle())); } if (issue.isPullRequest()) { HBox authorBox = createDisplayUserBox(guiElement.getAuthor(), issue.getCreator()); authorAssigneeBox.getChildren().add(authorBox); if (issue.getAssignee().isPresent()) { authorAssigneeBox.getChildren().add(new Label("--->")); } } if (issue.getAssignee().isPresent()) { HBox assigneeBox = createDisplayUserBox(guiElement.getAssignee(), issue.getAssignee().get()); authorAssigneeBox.getChildren().add(assigneeBox); } }

Target:
private void updateDetails() { issueDetails.getChildren().clear(); TurboIssue issue = guiElement.getIssue(); if (issue.isPullRequest()) { Label icon = new Label(OCTICON_PULL_REQUEST); icon.getStyleClass().addAll("octicon", "issue-pull-request-icon"); issueDetails.getChildren().add(icon); } if (issue.getCommentCount() > 0){ Label commentIcon = new Label(OCTICON_COMMENT); commentIcon.getStyleClass().addAll("octicon", "comments-label-button"); Label commentCount = new Label(Integer.toString(issue.getCommentCount())); if (issuesWithNewComments.contains(issue.getId())) { commentIcon.getStyleClass().add("has-comments"); commentCount.getStyleClass().add("has-comments"); } issueDetails.getChildren().add(commentIcon); issueDetails.getChildren().add(commentCount); } for (TurboLabel label : guiElement.getLabels()) { issueDetails.getChildren().add(label.getNode()); } if (issue.getMilestone().isPresent() && guiElement.getMilestone().isPresent()) { TurboMilestone milestone = guiElement.getMilestone().get(); issueDetails.getChildren().add(new Label(milestone.getTitle())); } if (issue.isPullRequest()) { HBox authorBox = createDisplayUserBox(guiElement.getAuthor(), issue.getCreator()); authorAssigneeBox.getChildren().add(authorBox); if (issue.getAssignee().isPresent()) { Label rightArrow = new Label(OCTICON_ARROW_RIGHT); rightArrow.getStyleClass().addAll("octicon", "pull-request-assign-icon"); authorAssigneeBox.getChildren().add(rightArrow); } } if (issue.getAssignee().isPresent()) { HBox assigneeBox = createDisplayUserBox(guiElement.getAssignee(), issue.getAssignee().get()); authorAssigneeBox.getChildren().add(assigneeBox); } }
Source:
protected void verifyPresentInDatastore(DataBundle data) { Map<String, AccountAttributes> accounts = data.accounts; for (AccountAttributes account : accounts.values()) { verifyPresentInDatastore(account); } Map<String, InstructorAttributes> instructors = data.instructors; for (InstructorAttributes instructor : instructors.values()) { verifyPresentInDatastore(instructor); } Map<String, CourseAttributes> courses = data.courses; for (CourseAttributes course : courses.values()) { if (!course.isCourseDeleted()) { verifyPresentInDatastore(course); } } Map<String, StudentAttributes> students = data.students; for (StudentAttributes student : students.values()) { verifyPresentInDatastore(student); } }

Target:
protected void verifyPresentInDatastore(DataBundle data) { data.accounts.values().forEach(this::verifyPresentInDatastore); data.instructors.values().forEach(this::verifyPresentInDatastore); data.courses.values().stream() .filter(course -> !course.isCourseDeleted()) .forEach(this::verifyPresentInDatastore); data.students.values().forEach(this::verifyPresentInDatastore); }
Source:
public boolean isRebuildAvailable() { Job project = getProject(); return project != null && project.hasPermission(Item.BUILD) && project.isBuildable() && project instanceof Queue.Task && !isMatrixRun() && isAutoRebuildDisbaled(); }

Target:
public boolean isRebuildAvailable() { Job project = getProject(); return project != null && project.hasPermission(Item.BUILD) && project.isBuildable() && project instanceof Queue.Task && !isMatrixRun() && !isRebuildDisbaled(); }
Source:
public static void refreshAllFeeds(final Context context, final List<Feed> feeds) { new Thread(() -> refreshAllFeedsSynchronously(context, feeds)).start(); }

Target:
public static void refreshAllFeeds(final Context context, final List<Feed> feeds) { refreshAllFeeds(context, feeds, null); }
Source:
protected void validateFingerprint(SSHClient client, String fingerprint) { if (!fingerprint.equals(getFingerprint(client))) { throw new AccessControlException("SSH Fingerprint of server " + getParameters().getServerName() + " did not match expected fingerprint " + fingerprint); } }

Target:
protected void validateFingerprint(SSHClient client, String fingerprint) { if (!fingerprint.equals(getFingerprint(client))) { throw new AccessControlException(String.format("SSH Fingerprint of server " + getParameters().getServerName() + " did not match expected fingerprint " + fingerprint)); } }
Source:
protected List<OptionalParameter> createOptionalParametersByName(Map<String, String> optinalParamaters) { List<OptionalParameter> optParams = new ArrayList<OptionalParameter>(); for (Entry<String, String> entry : optinalParamaters.entrySet()) { OptionalParameter optParam = null; String value = entry.getValue(); try { Tag tag = Tag.valueOf(entry.getKey()); Class type = determineTypeClass(tag); Class superclass = type.getSuperclass(); Class supersuperclass = superclass.getSuperclass(); Set<Class> classes = new HashSet<Class>(Arrays.asList(superclass, supersuperclass)); if (classes.contains(OctetString.class)) { optParam = (OptionalParameter) type.getConstructor(byte[].class).newInstance(value.getBytes()); } else if (classes.contains(OptionalParameter.Byte.class)) { Byte byteValue = (value == null) ? 0 : Byte.valueOf(value); optParam = (OptionalParameter) type.getConstructor(byte.class).newInstance(byteValue); } else if (classes.contains(OptionalParameter.Int.class)) { Integer intValue = (value == null) ? 0 : Integer.valueOf(value); optParam = (OptionalParameter) type.getConstructor(int.class).newInstance(intValue); } else if (classes.contains(OptionalParameter.Short.class)) { Short shortValue = (value == null) ? 0 : Short.valueOf(value); optParam = (OptionalParameter) type.getConstructor(short.class).newInstance(shortValue); } optParams.add(optParam); } catch (Exception e) { log.info("Couldn't determine optional parameter for key and value {}. Skip this one.", entry.getKey(), value); } } return optParams; }

Target:
protected List<OptionalParameter> createOptionalParametersByName(Map<String, String> optinalParamaters) { List<OptionalParameter> optParams = new ArrayList<OptionalParameter>(); for (Entry<String, String> entry : optinalParamaters.entrySet()) { OptionalParameter optParam = null; String value = entry.getValue(); try { Tag tag = Tag.valueOf(entry.getKey()); Class type = determineTypeClass(tag); Set<Class> ancestorClasses = new HashSet<Class>(2); Class superclass = type.getSuperclass(); ancestorClasses.add(superclass); if (superclass != Object.class) { ancestorClasses.add(superclass.getSuperclass()); } if (ancestorClasses.contains(OctetString.class)) { optParam = (OptionalParameter) type.getConstructor(byte[].class).newInstance(value.getBytes()); } else if (ancestorClasses.contains(OptionalParameter.Byte.class)) { Byte byteValue = (value == null) ? 0 : Byte.valueOf(value); optParam = (OptionalParameter) type.getConstructor(byte.class).newInstance(byteValue); } else if (ancestorClasses.contains(OptionalParameter.Int.class)) { Integer intValue = (value == null) ? 0 : Integer.valueOf(value); optParam = (OptionalParameter) type.getConstructor(int.class).newInstance(intValue); } else if (ancestorClasses.contains(OptionalParameter.Short.class)) { Short shortValue = (value == null) ? 0 : Short.valueOf(value); optParam = (OptionalParameter) type.getConstructor(short.class).newInstance(shortValue); } optParams.add(optParam); } catch (Exception e) { log.info("Couldn't determine optional parameter for key and value {}. Skip this one.", entry.getKey(), value); } } return optParams; }
Source:
public boolean addValidationParametersWithChecks(DiseaseOccurrence occurrence, boolean isGoldStandard) { if (isEligibleForValidation(occurrence)) { setDefaultParameters(occurrence); if (isGoldStandard) { addGoldStandardParameters(occurrence); } else if (automaticModelRunsEnabled(occurrence) && !isCountryPoint(occurrence)) { addValidationParameters(occurrence, null); } return true; } return false; }

Target:
public void addValidationParametersWithChecks(DiseaseOccurrence occurrence, boolean isGoldStandard) { if (isEligibleForValidation(occurrence)) { setDefaultParameters(occurrence); if (isGoldStandard) { addGoldStandardParameters(occurrence); } else if (automaticModelRunsEnabled(occurrence)) { addValidationParameters(occurrence); } } }
Source:
public void execute(final String activeContextId, final EventHandler<AvroElasticMemoryMessage> callback) { final ActiveContext activeContext = activeContexts.remove(activeContextId); final boolean isSuccess; if (activeContext == null) { LOG.log(Level.WARNING, "Trying to remove running task on active context {0}. Cannot find running task on it", activeContextId); isSuccess = false; } else { serverContexts.remove(activeContext); activeContext.close(); final int remainingNumServers = runningServerContextCount.decrementAndGet(); LOG.log(Level.FINE, "Server has been deleted successfully. Remaining Servers: {0}", remainingNumServers); isSuccess = true; } sendCallback(activeContextId, callback, isSuccess); }

Target:
public boolean execute(final String activeContextId, final EventHandler<AvroElasticMemoryMessage> callback) { final ActiveContext activeContext = activeContexts.remove(activeContextId); final boolean isSuccess; if (activeContext == null) { LOG.log(Level.WARNING, "Trying to remove active context {0}, which is not found", activeContextId); isSuccess = false; } else { serverContexts.remove(activeContext); activeContext.close(); final int remainingNumServers = runningServerContextCount.decrementAndGet(); LOG.log(Level.FINE, "Server has been deleted successfully. Remaining Servers: {0}", remainingNumServers); isSuccess = true; } sendCallback(activeContextId, callback, isSuccess); return isSuccess; }
Source:
public ServiceTest(TOptions options) { super(options); String searchEndpoint = Configuration.getGlobalConfiguration().get("SEARCH_ENDPOINT"); if (CoreUtils.isNullOrEmpty(searchEndpoint)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_ENDPOINT"); System.exit(1); } String searchApiKey = Configuration.getGlobalConfiguration().get("SEARCH_API_KEY"); if (CoreUtils.isNullOrEmpty(searchApiKey)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_API_KEY"); System.exit(1); } SearchIndexClientBuilder builder = new SearchIndexClientBuilder() .endpoint(searchEndpoint) .credential(new AzureKeyCredential(searchApiKey)) .httpClient(new NettyAsyncHttpClientBuilder().build()); this.searchIndexAsyncClient = builder.buildAsyncClient(); Random random = new Random(); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < INDEX_NAME_LENGTH; i++) { stringBuilder.append(ALLOWED_INDEX_CHARACTERS.charAt(random.nextInt(ALLOWED_INDEX_CHARACTERS.length()))); } this.indexName = stringBuilder.toString(); this.searchClient = builder.buildClient().getSearchClient(this.indexName); this.searchAsyncClient = this.searchIndexAsyncClient.getSearchAsyncClient(this.indexName); }

Target:
public ServiceTest(TOptions options) { super(options); String searchEndpoint = Configuration.getGlobalConfiguration().get("SEARCH_ENDPOINT"); if (CoreUtils.isNullOrEmpty(searchEndpoint)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_ENDPOINT"); System.exit(1); } String searchApiKey = Configuration.getGlobalConfiguration().get("SEARCH_API_KEY"); if (CoreUtils.isNullOrEmpty(searchApiKey)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_API_KEY"); System.exit(1); } SearchIndexClientBuilder builder = new SearchIndexClientBuilder() .endpoint(searchEndpoint) .credential(new AzureKeyCredential(searchApiKey)) .httpClient(new NettyAsyncHttpClientBuilder() .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888))) .build()); this.searchIndexAsyncClient = builder.buildAsyncClient(); this.indexName = new Random().ints(INDEX_NAME_LENGTH, 0, ALLOWED_INDEX_CHARACTERS.length()) .mapToObj(ALLOWED_INDEX_CHARACTERS::charAt) .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append) .toString(); this.searchClient = builder.buildClient().getSearchClient(this.indexName); this.searchAsyncClient = this.searchIndexAsyncClient.getSearchAsyncClient(this.indexName); }
Source:
private static void warmCache( TransactionService transactionService, TLongSet startTssToWarmingCache, TLongLongMap cache) { for (List<Long> longList : Iterables.partition(TDecorators.wrap(startTssToWarmingCache), TS_PER_BATCH)) { cache.putAll(transactionService.get(longList)); } }

Target:
private static void warmCache( TransactionService transactionService, TLongSet startTssToWarmingCache, TLongLongMap cache) { for (List<Long> longList : Iterables.partition(TDecorators.wrap(startTssToWarmingCache), AtlasDbConstants.TRANSACTION_TIMESTAMP_LOAD_BATCH_LIMIT)) { cache.putAll(transactionService.get(longList)); } }
Source:
public Integer deleteSelectedCategories(String[] inodes) throws Exception { final WebContext ctx = WebContextFactory.get(); final HttpServletRequest request = ctx.getHttpServletRequest(); final User user = WebAPILocator.getUserWebAPI().getLoggedInUser(request); Integer catsWithDependencies = 0; for (String inode : inodes) { final Category catToDelete = categoryAPI.find(inode, user, false); try { categoryAPI.delete(catToDelete, user, false); } catch(DotSecurityException | DotDataException e) { catsWithDependencies++; Logger.error(this, "Error delete Category. Name: " + catToDelete.getCategoryName() + ". Error: " + e.getMessage()); } } if(catsWithDependencies>0) { return 1; } return 0; }

Target:
public Integer deleteSelectedCategories(String[] inodes) throws Exception { final WebContext ctx = WebContextFactory.get(); final HttpServletRequest request = ctx.getHttpServletRequest(); final User user = WebAPILocator.getUserWebAPI().getLoggedInUser(request); int returnValue = ALL_CATEGORIES_DELETED; for (String inode : inodes) { final Category catToDelete = categoryAPI.find(inode, user, false); try { categoryAPI.delete(catToDelete, user, false); } catch(DotSecurityException | DotDataException e) { returnValue = SOME_CATEGORIES_DELETED; Logger.error(this, "Error delete Category. Name: " + catToDelete.getCategoryName() + ". Error: " + e.getMessage()); } } return returnValue; }
Source:
public List<StudentAttributes> createStudents(String lines, String courseId) throws EnrollException { List<String> invalidityInfo = new ArrayList<>(); String[] linesArray = lines.split(Const.EOL); List<StudentAttributes> studentList = new ArrayList<>(); StudentAttributesFactory saf = new StudentAttributesFactory(linesArray[0]); for (int i = 1; i < linesArray.length; i++) { String line = linesArray[i]; String sanitizedLine = SanitizationHelper.sanitizeForHtml(line); if (StringHelper.isWhiteSpace(line)) { continue; } try { StudentAttributes student = saf.makeStudent(line, courseId); if (!student.isValid()) { String info = StringHelper.toString(SanitizationHelper.sanitizeForHtml(student.getInvalidityInfo()), "<br>" + Const.StatusMessages.ENROLL_LINES_PROBLEM_DETAIL_PREFIX + " "); invalidityInfo.add(String.format(Const.StatusMessages.ENROLL_LINES_PROBLEM, sanitizedLine, info)); } if (isStudentEmailDuplicated(student.email, studentList)) { String info = getInvalidityInfoInDuplicatedEmail(student.email, studentList, linesArray) + "<br>" + Const.StatusMessages.ENROLL_LINES_PROBLEM_DETAIL_PREFIX + " "; invalidityInfo.add(String.format(Const.StatusMessages.ENROLL_LINES_PROBLEM, sanitizedLine, info)); } studentList.add(student); } catch (EnrollException e) { String info = String.format(Const.StatusMessages.ENROLL_LINES_PROBLEM, sanitizedLine, e.getMessage()); invalidityInfo.add(info); } } if (!invalidityInfo.isEmpty()) { throw new EnrollException(StringHelper.toString(invalidityInfo, "<br>")); } return studentList; }

Target:
public List<StudentAttributes> createStudents(String lines, String courseId) throws EnrollException { List<String> invalidityInfo = new ArrayList<>(); String[] linesArray = lines.split(Const.EOL); List<StudentAttributes> studentList = new ArrayList<>(); StudentAttributesFactory saf = new StudentAttributesFactory(linesArray[0]); for (int i = 1; i < linesArray.length; i++) { String line = linesArray[i]; String sanitizedLine = SanitizationHelper.sanitizeForHtml(line); if (StringHelper.isWhiteSpace(line)) { continue; } try { StudentAttributes student = saf.makeStudent(line, courseId); if (!student.isValid()) { invalidityInfo.add(invalidStudentInfo(sanitizedLine, student)); } int duplicateEmailIndex = getDuplicateEmailIndex(student.email, studentList); if (duplicateEmailIndex != -1) { invalidityInfo.add(duplicateEmailInfo(sanitizedLine, linesArray[duplicateEmailIndex + 1])); } studentList.add(student); } catch (EnrollException e) { invalidityInfo.add(enrollExceptionInfo(sanitizedLine, e.getMessage())); } } if (!invalidityInfo.isEmpty()) { throw new EnrollException(StringHelper.toString(invalidityInfo, "<br>")); } return studentList; }
Source:
public static boolean isRoute(URL url) { return ROUTE_PROTOCOL.equals(url.getProtocol()) || ROUTERS_CATEGORY.equals(url.getParameter(Constants.CATEGORY_KEY, Constants.DEFAULT_CATEGORY)); }

Target:
public static boolean isRoute(URL url) { return ROUTE_PROTOCOL.equals(url.getProtocol()) || ROUTERS_CATEGORY.equals(url.getParameter(CATEGORY_KEY, DEFAULT_CATEGORY)); }
Source:
public boolean areDevicesCoupled(final String deviceId, final String mbusDeviceId, Short mbusChannel) { final Device device = this.deviceRepository.findByDeviceIdentification(deviceId); final SmartMeter mbusDevice = this.smartMeterRepository.findByDeviceIdentification(mbusDeviceId); return (mbusDevice != null) && (device != null) && (mbusDevice.getGatewayDevice() != null) && ((mbusDevice.getGatewayDevice().getId() != null) && mbusDevice.getGatewayDevice().getId().equals(device.getId())) && ((mbusChannel == null) || mbusDevice.getChannel().equals(mbusChannel)); }

Target:
public boolean areDevicesCoupled(final String deviceId, final String mbusDeviceId, Short mbusChannel) { final Device device = this.deviceRepository.findByDeviceIdentification(deviceId); final SmartMeter mbusDevice = this.smartMeterRepository.findByDeviceIdentification(mbusDeviceId); return this.areDevicesCoupled(mbusDevice, device) && this.isMbusChannelEqual(mbusChannel, mbusDevice); }
Source:
public void setOnGround(boolean onGround) { super.setOnGround(onGround); if (onGround && this.getFallDistance() > 3) { float damage = this.getFallDistance() - 3; damage = Math.round(damage); if (damage == 0) return; EntityDamageEvent ev = new EntityDamageEvent(this, EntityDamageEvent.DamageCause.FALL, damage); this.getServer().getPluginManager().callEvent(ev); if (ev.isCancelled()) return; this.setLastDamageCause(ev); this.damage(damage); } this.setFallDistance(0); }

Target:
public void setOnGround(boolean onGround) { super.setOnGround(onGround); if (onGround && this.getFallDistance() > 3) { float damage = this.getFallDistance() - 3; damage = Math.round(damage); if (damage == 0) { return; } EntityDamageEvent ev = new EntityDamageEvent(this, EntityDamageEvent.DamageCause.FALL, damage); this.getServer().getPluginManager().callEvent(ev); if (ev.isCancelled()) { return; } this.setLastDamageCause(ev); this.damage(ev.getDamage()); } this.setFallDistance(0); }
Source:
public static String readPasswordIfNeeded(String user, String pwd, String prompt) throws IOException { if ((null!=user) && (user.trim().length()>0)) { if ((pwd==null) || (pwd.trim().length() == 0)) { Console console = System.console(); if (console == null) { throw new IOException("Unable to read password from console."); } return new String(console.readPassword(prompt)); } } return pwd; }

Target:
public static String readPasswordIfNeeded(String user, String pwd, String prompt) throws IOException { if ((null!=user) && (user.trim().length()>0)) { if ((pwd==null) || (pwd.trim().length() == 0)) { Console console = System.console(); if (console == null) { throw new IOException("Unable to read password from console."); } char[] val = console.readPassword("%s", prompt); if (val != null) { return new String(val); } else { return ""; } } } return pwd; }
Source:
CallBatcherImpl(DatabaseClient client, CallManagerImpl.CallerImpl<E> caller, Class<W> inputType, CallArgsGenerator<E> generator) { this(client, caller, inputType); this.callArgsGenerator = generator; }

Target:
CallBatcherImpl(DatabaseClient client, CallManagerImpl.CallerImpl<E> caller, Class<W> inputType, CallArgsGenerator<E> generator) { this(client, caller, inputType); if(generator == null) throw new IllegalArgumentException("Call Argument Generator cannot be null."); this.callArgsGenerator = generator; }
Source:
private Injector createSysInjector() { final List<Module> modules = new ArrayList<Module>(); modules.add(new WorkQueue.Module()); modules.add(new ChangeHookRunner.Module()); modules.add(new ReceiveCommitsExecutorModule()); modules.add(cfgInjector.getInstance(GerritGlobalModule.class)); modules.add(new DefaultCacheFactory.Module()); modules.add(new SmtpEmailSender.Module()); modules.add(new SignedTokenEmailTokenVerifier.Module()); modules.add(new PluginModule()); modules.add(new CanonicalWebUrlModule() { @Override protected Class<? extends Provider<String>> provider() { return HttpCanonicalWebUrlProvider.class; } }); modules.add(SshKeyCacheImpl.module()); modules.add(new MasterNodeStartup()); modules.add(new AbstractModule() { @Override protected void configure() { bindConstant().annotatedWith(Names.named("Headless")).to(false); } }); return cfgInjector.createChildInjector(modules); }

Target:
private Injector createSysInjector() { final List<Module> modules = new ArrayList<Module>(); modules.add(new WorkQueue.Module()); modules.add(new ChangeHookRunner.Module()); modules.add(new ReceiveCommitsExecutorModule()); modules.add(cfgInjector.getInstance(GerritGlobalModule.class)); modules.add(new DefaultCacheFactory.Module()); modules.add(new SmtpEmailSender.Module()); modules.add(new SignedTokenEmailTokenVerifier.Module()); modules.add(new PluginModule()); modules.add(new CanonicalWebUrlModule() { @Override protected Class<? extends Provider<String>> provider() { return HttpCanonicalWebUrlProvider.class; } }); modules.add(SshKeyCacheImpl.module()); modules.add(new MasterNodeStartup()); modules.add(new AbstractModule() { @Override protected void configure() { bind(GerritUiOptions.class).toInstance(new GerritUiOptions(false)); } }); return cfgInjector.createChildInjector(modules); }
Source:
public TileEntity createTileEntity(World var1, IBlockState state) { try { for (EntityMetaTag tag : EntityMetaTag.values()) { if (tag.meta == state.getBlock().getMetaFromState(state)) { return (TileEntity) tag.cls.getConstructor().newInstance(); } } System.out.println("Unknown block meta-tag: " + state.getBlock().getMetaFromState(state)); return (TileEntity) EntityMetaTag.Basic.cls.getConstructor().newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (SecurityException e) { e.printStackTrace(); } while (true) ; }

Target:
public TileEntity createTileEntity(World var1, IBlockState state) { try { for (EntityMetaTag tag : EntityMetaTag.values()) { if (tag.meta == state.getBlock().getMetaFromState(state)) { return (TileEntity) tag.cls.getConstructor().newInstance(); } } System.out.println("Unknown block meta-tag: " + state.getBlock().getMetaFromState(state)); return (TileEntity) EntityMetaTag.Basic.cls.getConstructor().newInstance(); } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { e.printStackTrace(); } throw new IllegalStateException("Failed to create tile entity."); }
Source:
public boolean isMainPage() { return properties.isMainPage(); }

Target:
public boolean isMainPage() { if (hasProperties()) { return properties.isMainPage(); } else { throw new NullPointerException("No PageProperties object exists for this PageTitle!"); } }
Source:
public void required() { realm.beginTransaction(); MutableRealmIntegerTypes c1 = realm.createObject(MutableRealmIntegerTypes.class); realm.commitTransaction(); Table table = realm.getTable(MutableRealmIntegerTypes.class); assertFalse(table.isColumnNullable(table.getColumnIndex(MutableRealmIntegerTypes.FIELD_NONNULLABLE_MUTABLEREALMINTEGER))); try { c1.columnNonNullableMutableRealmInteger.set(null); fail("should not be able to set an @Required MutableRealmInteger null"); } catch(IllegalStateException ignore) { } c1 = new MutableRealmIntegerTypes(); c1.columnNonNullableMutableRealmInteger.set(null); realm.beginTransaction(); try { MutableRealmIntegerTypes c2 = realm.copyToRealm(c1); fail("should not be able to copy an null valute to a @Required MutableRealmInteger"); } catch(IllegalArgumentException ignore) { } realm.commitTransaction(); }

Target:
public void required() { realm.beginTransaction(); MutableRealmIntegerTypes c1 = realm.createObject(MutableRealmIntegerTypes.class); realm.commitTransaction(); assertFalse( realm.getSchema().get("MutableRealmIntegerTypes") .isNullable(MutableRealmIntegerTypes.FIELD_NONNULLABLE_MUTABLEREALMINTEGER)); try { c1.columnNonNullableMutableRealmInteger.set(null); fail("should not be able to set an @Required MutableRealmInteger null"); } catch(IllegalStateException ignore) { } c1 = new MutableRealmIntegerTypes(); c1.columnNonNullableMutableRealmInteger.set(null); realm.beginTransaction(); try { MutableRealmIntegerTypes c2 = realm.copyToRealm(c1); fail("should not be able to copy an null valute to a @Required MutableRealmInteger"); } catch(IllegalArgumentException ignore) { } realm.commitTransaction(); }
Source:
public boolean start() { if (!started.get()) { LOGGER.info("started polling lookup [%s]", id); started.set(pollingLookup.isOpen()); } return started.get(); }

Target:
public boolean start() { synchronized (started) { if (!started.get()) { LOGGER.info("started polling lookup [%s]", id); started.set(pollingLookup.isOpen()); } return started.get(); } }
Source:
public void start() throws BundleException { final InjectorConfig config = new InjectorConfig(this); config.setListener(new InjectorCreationFailListener() { @Override public void creationFailed() { try { injectorCreationSuccess = false; started = false; bundleContext.getBundle().stop(); } catch (BundleException e) { e.printStackTrace(); } } }); Dictionary<String, Object> properties = new Hashtable<String, Object>(); registration = bundleContext.registerService(InjectorConfig.class.getName(), config, properties); if (injectorCreationSuccess) { started = true; } else { started = false; throw new BundleException("Failed to create an injector", BundleException.ACTIVATOR_ERROR); } }

Target:
public void start() throws BundleException { final InjectorConfig config = new InjectorConfig(this); Dictionary<String, Object> properties = new Hashtable<String, Object>(); bundleContext.registerService(InjectorConfig.class.getName(), config, properties); if (injectorCreationSuccess) { started = true; } else { started = false; throw new BundleException("Failed to create an injector", BundleException.ACTIVATOR_ERROR); } }
Source:
public Security createCredentials(@NonNull final String strategy, @NonNull final String kuid, @NonNull final JSONObject credentials, final Options options, final ResponseListener<JSONObject> listener) { try { JSONObject body = new JSONObject() .put("strategy", strategy) .put("kuid", kuid) .put("body", credentials); kuzzle.query(buildQueryArgs("security", "createCredentials"), body, options, new OnQueryDoneListener() { @Override public void onSuccess(JSONObject response) { try { if (listener != null) { listener.onSuccess(response.getJSONObject("result")); } } catch (JSONException e) { throw new RuntimeException(e); } } @Override public void onError(JSONObject error) { if (listener != null) { listener.onError(error); } } }); } catch (JSONException e) { throw new RuntimeException(e); } return this; }

Target:
public Security createCredentials(@NonNull final String strategy, @NonNull final String kuid, @NonNull final JSONObject credentials, final Options options, final ResponseListener<JSONObject> listener) { try { JSONObject body = new JSONObject() .put("strategy", strategy) .put("_id", kuid) .put("body", credentials); kuzzle.query(buildQueryArgs("security", "createCredentials"), body, options, new OnQueryDoneListener() { @Override public void onSuccess(JSONObject response) { try { if (listener != null) { listener.onSuccess(response.getJSONObject("result")); } } catch (JSONException e) { throw new RuntimeException(e); } } @Override public void onError(JSONObject error) { if (listener != null) { listener.onError(error); } } }); } catch (JSONException e) { throw new RuntimeException(e); } return this; }
Source:
public static void clean(ByteBuffer buffer) { try { Object cleaner = CLEANER_FIELD.get(buffer); CLEAN_METHOD.invoke(cleaner); } catch (IllegalAccessException | InvocationTargetException e) { logger.warn("Clean failed for buffer " + buffer.getClass().getSimpleName(), e); } }

Target:
public static void clean(ByteBuffer buffer) { if (CLEANER_FIELD == null || CLEAN_METHOD == null) { return; } try { Object cleaner = CLEANER_FIELD.get(buffer); CLEAN_METHOD.invoke(cleaner); } catch (IllegalAccessException | InvocationTargetException | NullPointerException e) { logger.warn("Clean failed for buffer " + buffer.getClass().getSimpleName(), e); } }
Source:
public Builder setPrefixName(String prefix) { this.keyName = prefix; return this; }

Target:
public Builder setPrefixName(String prefix) { this.name = prefix; return this; }
Source:
private Collection<String> computeRowValueCollection(int lineNumber) { Collection<String> rowValues = newLinkedList(); for (String type : modulesByType.keySet()) { Iterator<ModuleDefinitionResource> modules = modulesByType.get(type).iterator(); ModuleDefinitionResource module = Iterators.get(modules, lineNumber, null); rowValues.add(computeModuleValue(module)); } return rowValues; }

Target:
private Collection<String> computeRowValueCollection(int lineNumber) { Collection<String> rowValues = newLinkedList(); for (String type : modulesByType.keySet()) { ModuleDefinitionResource module = Iterators.get(iteratorsByType.get(type), lineNumber, null); rowValues.add(computeModuleValue(module)); } return rowValues; }
Source:
private void addBondSlaveToBonds(Nic sourceNic, String destinationNicName) { String bondName = sourceNic.getBondName(); if (!destinationBondSlavesByName.containsKey(bondName)) { destinationBondSlavesByName.put(bondName, new ArrayList<>()); } destinationBondSlavesByName.get(bondName).add(destinationNicName); }

Target:
private void addBondSlaveToBonds(Nic sourceNic, String destinationNicName) { String sourceBondName = sourceNic.getBondName(); if (!destinationBondSlavesByName.containsKey(sourceBondName)) { destinationBondSlavesByName.put(sourceBondName, new ArrayList<>()); } destinationBondSlavesByName.get(sourceBondName).add(destinationNicName); }
Source:
public synchronized long getTimeToNextJob() { TimerJobInstance item = (TimerJobInstance) queue.peek(); return (item != null && item.getTrigger().hasNextFireTime() != null) ? item.getTrigger().hasNextFireTime().getTime() - this.timer.get() : -1; }

Target:
public synchronized long getTimeToNextJob() { TimerJobInstance item = (TimerJobInstance) queue.peek(); return (item != null) ? item.getTrigger().hasNextFireTime().getTime() - this.timer.get() : -1; }
Source:
public void handleIncoming(@PathVariable String configName, @RequestParam Map<String, String> params) { LOGGER.info("Incoming SMS - configName = {}, params = {}", configName, params); Config config; if (configService.hasConfig(configName)) { config = configService.getConfig(configName); } else { String msg = String.format("Invalid config in incoming request: %s, params: %s", configName, params); LOGGER.error(msg); statusMessageService.warn(msg, SMS_MODULE); return; } Template template = templateService.getTemplate(config.getTemplateName()); eventRelay.sendEventMessage(inboundEvent(config.getName(), getSenderKey(params, template), getRecipientKey(params, template), getMessageKey(params, template), getMsgIdKey(params, template), getTimestampKey(params, template))); smsRecordsDataService.create(new SmsRecord(config.getName(), INBOUND, getSenderKey(params, template), getMessageKey(params, template), now(), getStatusKey(params, template), null, null, getMsgIdKey(params, template), null)); }

Target:
public void handleIncoming(@PathVariable String configName, @RequestParam Map<String, String> params) { LOGGER.info("Incoming SMS - configName = {}, params = {}", configName, params); Config config; if (configService.hasConfig(configName)) { config = configService.getConfig(configName); } else { String msg = String.format("Invalid config in incoming request: %s, params: %s", configName, params); LOGGER.error(msg); statusMessageService.warn(msg, SMS_MODULE); return; } Template template = templateService.getTemplate(config.getTemplateName()); eventRelay.sendEventMessage(inboundEvent(config.getName(), getSender(params, template), getRecipient(params, template), getMessage(params, template), getMsgId(params, template), getTimestamp(params, template))); smsRecordsDataService.create(new SmsRecord(config.getName(), INBOUND, getSender(params, template), getMessage(params, template), now(), getStatus(params, template), null, null, getMsgId(params, template), null)); }
Source:
private void flatMap(IndexedRecord input, ProcessContext context) throws IOException { interpreter.set("inputJSON", new PyString(input.toString())); long timeInit = System.currentTimeMillis(); interpreter.exec("outputJSON = userFunction(inputJSON)"); PyObject outputList = interpreter.get("outputJSON"); if (outputList instanceof PyList) { PyList list = (PyList) outputList; for (Object output : list) { if (jsonGenericRecordConverter == null) { JsonSchemaInferrer jsonSchemaInferrer = new JsonSchemaInferrer(new ObjectMapper()); Schema jsonSchema = jsonSchemaInferrer.inferSchema(output.toString()); jsonGenericRecordConverter = new JsonGenericRecordConverter(jsonSchema); } GenericRecord outputRecord = jsonGenericRecordConverter.convertToAvro(output.toString()); context.output(outputRecord); } } }

Target:
private void flatMap(IndexedRecord input, ProcessContext context) throws IOException { PyObject outputList = pyFn.__call__(new PyString(input.toString())); if (outputList instanceof PyList) { PyList list = (PyList) outputList; for (Object output : list) { if (jsonGenericRecordConverter == null) { JsonSchemaInferrer jsonSchemaInferrer = new JsonSchemaInferrer(new ObjectMapper()); Schema jsonSchema = jsonSchemaInferrer.inferSchema(output.toString()); jsonGenericRecordConverter = new JsonGenericRecordConverter(jsonSchema); } GenericRecord outputRecord = jsonGenericRecordConverter.convertToAvro(output.toString()); context.output(outputRecord); } } }
Source:
public void saveOrder_shouldPassDrugOrderWithADrugNonCodedWhenDrugOrderIsNonCoded() throws Exception { Patient patient = Context.getPatientService().getPatient(7); CareSetting careSetting = Context.getOrderService().getCareSetting(2); OrderType orderType = Context.getOrderService().getOrderTypeByName("Drug order"); assertNull(Context.getAdministrationService().getGlobalPropertyObject( OpenmrsConstants.GLOBAL_PROPERTY_DRUG_ORDER_REQUIRE_DRUG)); DrugOrder order = new DrugOrder(); Encounter encounter = Context.getEncounterService().getEncounter(3); order.setEncounter(encounter); order.setConcept(Context.getOrderService().getNonCodedDrugConcept()); order.setDrugNonCoded("Non coded drug"); order.setPatient(patient); order.setCareSetting(careSetting); order.setOrderer(Context.getProviderService().getProvider(1)); order.setDateActivated(encounter.getEncounterDatetime()); order.setOrderType(orderType); order.setDosingType(FreeTextDosingInstructions.class); order.setInstructions("None"); order.setDosingInstructions("Test Instruction"); Errors errors = new BindException(order, "order"); new DrugOrderValidator().validate(order, errors); Assert.assertFalse(errors.hasFieldErrors()); }

Target:
public void saveOrder_shouldPassDrugOrderWithADrugNonCodedWhenDrugOrderIsNonCoded() throws Exception { executeDataSet("org/openmrs/api/include/OrderServiceTest-nonCodedDrugs.xml"); Patient patient = Context.getPatientService().getPatient(7); CareSetting careSetting = Context.getOrderService().getCareSetting(2); OrderType orderType = Context.getOrderService().getOrderTypeByName("Drug order"); GlobalProperty gp = new GlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_DRUG_ORDER_REQUIRE_DRUG, "true"); Context.getAdministrationService().saveGlobalProperty(gp); DrugOrder order = new DrugOrder(); Encounter encounter = Context.getEncounterService().getEncounter(3); order.setEncounter(encounter); order.setConcept(Context.getOrderService().getNonCodedDrugConcept()); order.setDrugNonCoded("Non coded drug"); order.setPatient(patient); order.setCareSetting(careSetting); order.setOrderer(Context.getProviderService().getProvider(1)); order.setDateActivated(encounter.getEncounterDatetime()); order.setOrderType(orderType); order.setDosingType(FreeTextDosingInstructions.class); order.setInstructions("None"); order.setDosingInstructions("Test Instruction"); Errors errors = new BindException(order, "order"); new DrugOrderValidator().validate(order, errors); Assert.assertFalse(errors.hasFieldErrors()); }
Source:
protected void endVmCommand() { if (CommandCoordinatorUtil.getChildCommandIds(getCommandId()).size() > 1) { log.info("There are still running Coco tasks"); return; } Snapshot createdSnapshot = getSnapshotDao().get(getVmId(), getParameters().getSnapshotType(), SnapshotStatus.LOCKED); boolean taskGroupSucceeded = createdSnapshot != null && getParameters().getTaskGroupSuccess(); boolean liveSnapshotRequired = isLiveSnapshotApplicable(); boolean liveSnapshotSucceeded = false; if (taskGroupSucceeded) { getSnapshotDao().updateStatus(createdSnapshot.getId(), SnapshotStatus.OK); if (liveSnapshotRequired) { liveSnapshotSucceeded = performLiveSnapshot(createdSnapshot); } else { if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { logMemorySavingFailed(); getSnapshotDao().removeMemoryFromSnapshot(createdSnapshot.getId()); removeMemoryVolumesOfSnapshot(createdSnapshot); } } } else { if (createdSnapshot != null) { revertToActiveSnapshot(createdSnapshot.getId()); if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { removeMemoryVolumesOfSnapshot(createdSnapshot); } } else { log.warn("No snapshot was created for VM '{}' which is in LOCKED status", getVmId()); } } incrementVmGeneration(); endActionOnDisks(); setSucceeded(taskGroupSucceeded && (!liveSnapshotRequired || liveSnapshotSucceeded)); getReturnValue().setEndActionTryAgain(false); }

Target:
protected void endVmCommand() { if (CommandCoordinatorUtil.getChildCommandIds(getCommandId()).size() > 1) { log.info("There are still running CoCo tasks"); return; } Snapshot createdSnapshot = getSnapshotDao().get(getVmId(), getParameters().getSnapshotType(), SnapshotStatus.LOCKED); boolean taskGroupSucceeded = createdSnapshot != null && getParameters().getTaskGroupSuccess(); boolean liveSnapshotRequired = isLiveSnapshotApplicable(); boolean liveSnapshotSucceeded = false; if (taskGroupSucceeded) { getSnapshotDao().updateStatus(createdSnapshot.getId(), SnapshotStatus.OK); if (liveSnapshotRequired) { liveSnapshotSucceeded = performLiveSnapshot(createdSnapshot); } else { if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { logMemorySavingFailed(); getSnapshotDao().removeMemoryFromSnapshot(createdSnapshot.getId()); removeMemoryVolumesOfSnapshot(createdSnapshot); } } } else { if (createdSnapshot != null) { revertToActiveSnapshot(createdSnapshot.getId()); if (getParameters().isSaveMemory() && createdSnapshot.containsMemory()) { removeMemoryVolumesOfSnapshot(createdSnapshot); } } else { log.warn("No snapshot was created for VM '{}' which is in LOCKED status", getVmId()); } } incrementVmGeneration(); endActionOnDisks(); setSucceeded(taskGroupSucceeded && (!liveSnapshotRequired || liveSnapshotSucceeded)); getReturnValue().setEndActionTryAgain(false); }
Source:
public void findDependedUponMethods() throws NoSuchMethodException { TestClass testClass = new TestClass(); ConstructorOrMethod constructorOrMethod = new ConstructorOrMethod(testClass.getClass().getMethod("dummyMethod")); IAnnotationFinder annotationFinder = new JDK15AnnotationFinder(new AnnotationTransformer()); ITestNGMethod method = new ConfigurationMethod( constructorOrMethod, annotationFinder, false, false, false, false, false, false, true, false, new String[0], new String[0], testClass); ITestNGMethod[] methods = new ITestNGMethod[0]; method.addMethodDependedUpon("dummyDependsOnMethod"); MethodHelper.findDependedUponMethods(method, methods); fail("Should have risen a nice exception"); }

Target:
public void findDependedUponMethods() throws NoSuchMethodException { TestClass testClass = new TestClass(); ConstructorOrMethod constructorOrMethod = new ConstructorOrMethod(testClass.getClass().getMethod("dummyMethod")); IAnnotationFinder annotationFinder = new JDK15AnnotationFinder(new AnnotationTransformer()); ITestNGMethod method = new ConfigurationMethod( constructorOrMethod, annotationFinder, false, false, false, false, false, false, true, false, new String[0], new String[0], testClass); method.addMethodDependedUpon("dummyDependsOnMethod"); ITestNGMethod[] methods = new ITestNGMethod[0]; MethodHelper.findDependedUponMethods(method, methods); }
Source:
public void register(SystemStreamPartition systemStreamPartition, String offset) { String offsetToRegister; if (offset == null) { LOG.info("Registering ssp with starting offset null, overriding to 0", systemStreamPartition); offsetToRegister = "0"; } else { LOG.info("Registering ssp with starting offset {}", systemStreamPartition, offset); offsetToRegister = offset; } sspToOffset.put(systemStreamPartition, (offset == null) ? "0" : offsetToRegister); }

Target:
public void register(SystemStreamPartition systemStreamPartition, String offset) { String offsetToRegister; if (offset == null) { LOG.info("Registering ssp with starting offset null, overriding to 0", systemStreamPartition); offsetToRegister = "0"; } else { LOG.info("Registering ssp with starting offset {}", systemStreamPartition, offset); offsetToRegister = offset; } sspToOffset.put(systemStreamPartition, offsetToRegister); }
Source:
public CamusSweeperPlanner setPropertiesLogger(Properties props, Logger log) { dUtils = new DateUtils(props); hourFormatter = dUtils.getDateTimeFormatter("YYYY/MM/dd/HH"); return super.setPropertiesLogger(props, log); }

Target:
public CamusSweeperPlanner setPropertiesLogger(Properties props, Logger log) { dUtils = new DateUtils(props); hourFormatter = dUtils.getDateTimeFormatter(YYYY_MM_DD_HH); return super.setPropertiesLogger(props, log); }