auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public LiveMigrateDiskCommand(T parameters) { super(parameters); setStoragePoolId(getVm().getStoragePoolId()); getParameters().setStoragePoolId(getStoragePoolId().getValue()); getParameters().setVdsId(getVdsId()); getParameters().setDiskAlias(getDiskAlias()); getParameters().setImageGroupID(getImageGroupId()); getParameters().setCommandType(getActionType()); getParameters().setTaskGroupSuccess(getParameters().getTaskGroupSuccess() && <START> (getVm().getStatus() == VMStatus.Up || getVm().getStatus() == VMStatus.Paused)); <END> }</code><technical_language>this "OR" in places. Consider extracting a helper method in VMStatus</technical_language>

Target:
public LiveMigrateDiskCommand(T parameters) { super(parameters); setStoragePoolId(getVm().getStoragePoolId()); getParameters().setStoragePoolId(getStoragePoolId().getValue()); getParameters().setVdsId(getVdsId()); getParameters().setDiskAlias(getDiskAlias()); getParameters().setImageGroupID(getImageGroupId()); getParameters().setCommandType(getActionType()); getParameters().setTaskGroupSuccess(getParameters().getTaskGroupSuccess() && getVm().getStatus().isUpOrPaused()); }
Source:
<code>public void testThreads() throws InterruptedException { final Logger logger = Mockito.mock(Logger.class); final int totalCount = Runtime.getRuntime().availableProcessors(); List<Future<?>> futures = new ArrayList<>(); Mockito.when(logger.isLoggable(any())).thenReturn(true); ExecutorService executor = Executors.newFixedThreadPool(totalCount); System.out.println(String.format("Will run %d threads", totalCount)); try (final Progress progress = new Progress(logger, "foo", totalCount)) { while (progress.getLoggerThread().getState() != Thread.State.WAITING) { System.out.println("Waiting for the logger thread to reach the initial wait()"); TimeUnit.MILLISECONDS.sleep(10); } for (int i = 0; i < totalCount; i++) { futures.add(executor.submit(progress::increment)); } } System.out.println("Waiting for threads to finish"); futures.forEach(future -> { try { <START> future.get(); <END> } catch (Exception e) { Assert.fail(); } }); executor.shutdown(); System.out.println("Verifying"); Mockito.verify(logger, atLeast(1)).log(any(), anyString(), any(Object[].class)); }</code><technical_language>AutoCloseable close() finished? futures waits happen try</technical_language>

Target:
public void testThreads() throws InterruptedException { final Logger logger = Mockito.mock(Logger.class); final int totalCount = Runtime.getRuntime().availableProcessors(); List<Future<?>> futures = new ArrayList<>(); Mockito.when(logger.isLoggable(any())).thenReturn(true); ExecutorService executor = Executors.newFixedThreadPool(totalCount); System.out.println(String.format("Will run %d threads", totalCount)); try (final Progress progress = new Progress(logger, "foo", totalCount)) { while (progress.getLoggerThread().getState() != Thread.State.WAITING) { System.out.println("Waiting for the logger thread to reach the initial wait()"); TimeUnit.MILLISECONDS.sleep(10); } for (int i = 0; i < totalCount; i++) { futures.add(executor.submit(progress::increment)); } System.out.println("Waiting for threads to finish"); futures.forEach(future -> { try { future.get(); } catch (Exception e) { Assert.fail(); } }); } executor.shutdown(); System.out.println("Verifying"); Mockito.verify(logger, atLeast(1)).log(any(), anyString(), any(Object[].class)); }
Source:
<code>private HttpUriBuilder(URI previous) { scheme = previous.getScheme(); host = previous.getHost(); port = previous.getPort(); <START> path = isNull(previous.getRawPath()) ? null : percentDecode(previous.getRawPath()); <END> params.putAll(parseParams(previous.getRawQuery())); }</code><technical_language>methods intended for lambdas. code harder read standard write null checks (which in Java forever)</technical_language>

Target:
private HttpUriBuilder(URI previous) { scheme = previous.getScheme(); host = previous.getHost(); port = previous.getPort(); path = Optional.ofNullable(previous.getRawPath()).map(HttpUriBuilder::percentDecode).orElse(null); params.putAll(parseParams(previous.getRawQuery())); }
Source:
<code>public void loadConfig() throws IOException { final Resource config = configPathDir.get(CONFIG_FILE_NAME); InputStream fis = config.in(); try { this.configuration.load(fis); } finally { <START> fis.close(); <END> } }</code><technical_language>@NielsCharlier consider refactoring this Java 7 try-with-resources</technical_language>

Target:
public void loadConfig() throws IOException { Resource config = configPathDir.get(CONFIG_FILE_NAME); try (InputStream fis = config.in()) { this.configuration.load(fis); } }
Source:
<code>private void updateSelectedList() { Set<Integer> indexes = new HashSet<Integer>(); selectedList.clear(); ListBox listBox = asListBox(); while (listBox.getSelectedIndex() >= 0) { int index = listBox.getSelectedIndex(); listBox.setItemSelected(index, false); String selectedElem = listBox.getItemText(index); <START> T value = getTypedValue(selectedElem); <END> selectedList.add(value); indexes.add(index); } for (Integer index : indexes) { listBox.setItemSelected(index, true); } }</code><technical_language>AFAIK, reason "renderedValue-to-typedValue" lookup is ListBox widget is low-level, e.g. lacks a track typed values items. Is correct? Is possibly avoid mentioned lookup? (What if renderer produces "dynamic" String values?)</technical_language>

Target:
private void updateSelectedList() { Set<Integer> indexes = new HashSet<Integer>(); selectedList.clear(); ListBox listBox = asListBox(); while (listBox.getSelectedIndex() >= 0) { int index = listBox.getSelectedIndex(); listBox.setItemSelected(index, false); if (index >= 0 && index < typedItemList.size()) { T value = typedItemList.get(index); selectedList.add(value); } indexes.add(index); } for (Integer index : indexes) { listBox.setItemSelected(index, true); } }
Source:
<code>public String getShortName() { <START> return "JBoss"; <END> }</code><technical_language>need AS7 here. JBoss includes a lot of products</technical_language>

Target:
public String getShortName() { return "JBossAS7"; }
Source:
<code>public void cli(Configuration config) { if (config.m_startAction != StartAction.GET) { System.err.println("This can only be called for GET action."); VoltDB.exit(-1); } if (!config.m_voltdbRoot.exists() || !config.m_voltdbRoot.canRead() || !config.m_voltdbRoot.canExecute() || !config.m_voltdbRoot.isDirectory()) { try { System.err.println("Invalid Voltdbroot directory: " + config.m_voltdbRoot.getCanonicalPath()); } catch (IOException ex) { } VoltDB.exit(-1); } ConfigFactory.clearProperty(Settings.CONFIG_DIR); switch (config.m_getOption) { case DEPLOYMENT: outputDeployment(config); break; case SCHEMA: outputSchema(config); break; <START> case CLASSES: <END> outputProcedure(config); break; } VoltDB.exit(0); }</code><technical_language>Do in next ticket</technical_language>

Target:
public void cli(Configuration config) { if (config.m_startAction != StartAction.GET) { System.err.println("This can only be called for GET action."); VoltDB.exit(-1); } if (!config.m_voltdbRoot.exists() || !config.m_voltdbRoot.canRead() || !config.m_voltdbRoot.canExecute() || !config.m_voltdbRoot.isDirectory()) { try { System.err.println("FATAL: Invalid Voltdbroot directory: " + config.m_voltdbRoot.getCanonicalPath()); } catch (IOException ex) { } VoltDB.exit(-1); } ConfigFactory.clearProperty(Settings.CONFIG_DIR); switch (config.m_getOption) { case DEPLOYMENT: outputDeployment(config); break; case SCHEMA: outputSchema(config); break; } VoltDB.exit(0); }
Source:
<code>public Store open(URI address) throws IllegalAddressException, NoSuitableDriverException, StoreException { if (address == null) { throw new NullPointerException("address"); } String scheme = address.getScheme(); if (scheme == null) { throw new IllegalAddressException(address.toString(), context.getStrings().get("storage.address.no_scheme")); } scheme = scheme.toLowerCase(); InstalledDriver driver; List<InstalledDriver> installedDrivers = null; lock.lock(); try { driver = drivers.get(scheme); if (driver == null) { installedDrivers = getInstalledDrivers(); } } finally { lock.unlock(); } if (driver != null) { <START> return new Store(driver, address).open(); <END> } for (InstalledDriver idriver : installedDrivers) { try { return new Store(idriver, address).open(); } catch (IllegalAddressException ex) { } catch (StoreException ex) { } } throw new NoSuitableDriverException(address); }</code><technical_language>Is store thread safe</technical_language>

Target:
public Store open(URI address) throws IllegalAddressException, NoSuitableDriverException, StoreException { if (address == null) { throw new NullPointerException("address"); } String scheme = address.getScheme(); if (scheme != null) { scheme = scheme.toLowerCase(); } InstalledDriver driver; List<InstalledDriver> installedDrivers = null; synchronized (drivers) { driver = (scheme == null ? null : drivers.get(scheme)); if (driver == null) { installedDrivers = getInstalledDrivers(); } } if (driver != null) { return new Store(driver, address).open(); } for (InstalledDriver idriver : installedDrivers) { try { return new Store(idriver, address).open(); } catch (IllegalAddressException ex) { } catch (StoreException ex) { } } throw new NoSuitableDriverException(address); }
Source:
<code>public StudentProfileAttributes getCopy() { <START> return new StudentProfileAttributes(this.toEntity()); <END> }</code><technical_language>modifiedDate is copied over</technical_language>

Target:
public StudentProfileAttributes getCopy() { StudentProfileAttributes newSpa = new StudentProfileAttributes(this.toEntity()); newSpa.modifiedDate = this.modifiedDate; return newSpa; }
Source:
<code>public static void logRetriesExhaustedWithDetailsException( Logger log, String context, RetriesExhaustedWithDetailsException exception) { if (log.isDebugEnabled()) { log.error("For context {}: exception occured during a bulk operation: {}", context, exception.getExhaustiveDescription()); } log.error("For context {}: exception occured during a bulk operation: {}", context, exception.getMessage()); <START> log.error("For context {}: First bulk operation exception", exception.getCause(0), context); <END> Map<String, Integer> furtherInfo = new TreeMap<>(); List<Throwable> causes = exception.getCauses(); for (Throwable throwable : causes) { String message = throwable.getMessage(); Integer count = furtherInfo.get(message); if (count == null) { furtherInfo.put(message, 1); } else { furtherInfo.put(message, 1 + count); } } for (Entry<String, Integer> entry : furtherInfo.entrySet()) { log.error( "For context {}: The follow exception occurred times: '{}'.", context, entry.getValue(), entry.getKey()); } }</code><technical_language>dump question, do in exception? do a check first</technical_language>

Target:
public static void logRetriesExhaustedWithDetailsException( Logger log, String context, RetriesExhaustedWithDetailsException exception) { if (log.isDebugEnabled()) { log.error("For context {}: exception occured during a bulk operation: {}", context, exception.getExhaustiveDescription()); } if (exception.getNumExceptions() == 0) { log.error( "For context {}: Got a RetriesExhaustedWithDetailsException without any details.", exception); return; } Map<String, Integer> furtherInfo = new TreeMap<>(); List<Throwable> causes = exception.getCauses(); for (Throwable throwable : causes) { String message = throwable.getMessage(); Integer count = furtherInfo.get(message); if (count == null) { furtherInfo.put(message, 1); } else { furtherInfo.put(message, 1 + count); } } log.error( String.format( "For context %s: %d exceptions occured during a bulk operation:\n\t%s.\n" + "The stack trace is a sample exception, of the first exception.\n" + "Breakdown of exceptions {type - count}: %s", context, exception.getNumExceptions(), exception.getMessage(), furtherInfo), exception.getCause(0)); }
Source:
<code>public FBOConfig getFboConfig(ResourceUrn fboName) { FBOConfig fboConfig = fboConfigs.get(fboName); <START> if (fboConfigs == null) { <END> logger.error("Failed to retrieve FBOConfig '" + fboName + "'!"); } return fboConfig; }</code><technical_language>fboConfig I presume - s</technical_language>

Target:
public FBOConfig getFboConfig(ResourceUrn fboName) { FBOConfig fboConfig = fboConfigs.get(fboName); if (fboConfig == null) { logger.warn("Failed to retrieve FBOConfig '" + fboName + "'!"); } return fboConfig; }
Source:
<code>public String display() { String nl = System.lineSeparator(); <START> return "Task \'" + name + "\' : " + <END> nl + LogFormatter.addIndent("Description = '" + description + "'" + nl + (restartTaskOnError.isSet() ? "restartTaskOnError = '" + restartTaskOnError.getValue() + '\'' + nl : "") + (onTaskError.isSet() ? "onTaskError = '" + onTaskError.getValue() + '\'' + nl : "") + (maxNumberOfExecution.isSet() ? "maxNumberOfExecution = '" + maxNumberOfExecution.getValue() .getIntegerValue() + '\'' + nl : "") + "tag = " + tag + nl + LogFormatter.displayMap("variables", variables) + nl + LogFormatter.displayMap("genericInformation", genericInformation) + nl + "InputFiles = " + inputFiles + nl + "OutputFiles = " + outputFiles + nl + "ParallelEnvironment = " + parallelEnvironment + nl + "FlowBlock = '" + flowBlock + "'" + nl + "SelectionScripts = " + displaySelectionScripts() + nl + "ForkEnvironment = " + forkEnvironment + nl + "PreScript = " + ((preScript != null) ? preScript.display() : null) + nl + "PostScript = " + ((postScript != null) ? postScript.display() : null) + nl + "CleanScript = " + ((cScript != null) ? cScript.display() : null) + nl + "FlowScript = " + ((flowScript != null) ? flowScript.display() : null) + nl + "PreciousResult = " + preciousResult + nl + "PreciousLogs = " + preciousLogs + nl + "RunAsMe = " + runAsMe + nl + "WallTime = " + wallTime + nl + "Dependences = " + dependences); }</code><technical_language>This concatenation is a bit difficult follow. creating a method for component? String appendMaxNumberOfExecution(...) String appendInputFiles(...). easier read</technical_language>

Target:
public String display() { return "Task '" + name + "' : " + System.lineSeparator() + addIndent(Stream.of(lineWithQuotes("Description", description), line("restartTaskOnError", restartTaskOnError), line("onTaskError", onTaskError), line("maxNumberOfExecution", maxNumberOfExecution, () -> maxNumberOfExecution.getValue().getIntegerValue()), line("tag", tag), line("variables", variables), line("genericInformation", genericInformation), line("InputFiles", inputFiles), line("OutputFiles", outputFiles), line("ParallelEnvironment", parallelEnvironment), lineWithQuotes("FlowBlock", flowBlock), line("SelectionScripts", displaySelectionScripts()), line("ForkEnvironment", forkEnvironment), line("PreScript", preScript, () -> preScript.display()), line("PostScript", postScript, () -> postScript.display()), line("CleanScript", cScript, () -> cScript.display()), line("FlowScript", flowScript, () -> flowScript.display()), line("PreciousResult", preciousResult), line("PreciousLogs", preciousLogs), line("RunAsMe", runAsMe), line("WallTime", wallTime), line("Dependences", dependences)) .filter(s -> !s.isEmpty()) .collect(Collectors.joining(System.lineSeparator()))); }
Source:
<code>public SubChannel(String service, @NotNull TChannel topChannel, Connection.Direction preferredDirection) { <START> if (topChannel == null) { <END> throw new NullPointerException("`topChannel` cannot be null"); } if (preferredDirection == null) { throw new NullPointerException("`preferredDirection` cannot be null"); } this.service = service; this.topChannel = topChannel; this.peerManager = topChannel.getPeerManager(); this.initTimeout = topChannel.getInitTimeout(); this.preferredDirection = preferredDirection; }</code><technical_language>checked automated bytecode instrumentation, need for manual checks - @NotNull provides enough compile-time information</technical_language>

Target:
public SubChannel(String service, @NotNull TChannel topChannel, Connection.Direction preferredDirection) { this.service = service; this.topChannel = topChannel; this.peerManager = topChannel.getPeerManager(); this.initTimeout = topChannel.getInitTimeout(); this.preferredDirection = preferredDirection; }
Source:
<code>public CompletableFuture<Void> downloadAndInstallMod(String uid) { return fafService.getMod(uid).thenAccept(mod -> downloadAndInstallMod(mod, null, null)) .exceptionally(throwable -> { logger.warn("Mod for modupdate not found", throwable); return null; <START> }); <END> }</code><technical_language>calls this method failed (only exceptionally is called) game start mod installed. error must, therefore, handled in calling code. Also, assumption "not found" correct other reasons exception thrown, disconnect, server down, disk space full, file system permission, out of memory, on</technical_language>

Target:
public CompletableFuture<Void> downloadAndInstallMod(String uid) { return fafService.getMod(uid).thenAccept(mod -> downloadAndInstallMod(mod, null, null)); }
Source:
<code>void onNewDocument() { final Path contextPath = context.getActivePackage().getPackageMainResourcesPath(); helper.createNewGuidedDecisionTable( contextPath, "", GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, view, ( path ) -> <START> onOpenDocumentsInEditor( new ArrayList<Path>() {{ <END> add( path ); }} ) ); }</code><technical_language>Collections.singletonList(path) double brace initialization creates anonymous class time</technical_language>

Target:
void onNewDocument() { final Path contextPath = context.getActivePackage().getPackageMainResourcesPath(); helper.createNewGuidedDecisionTable( contextPath, "", GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, view, ( path ) -> onOpenDocumentsInEditor( Collections.singletonList( path ) ) ); }
Source:
<code>private static <ViewModelType extends ViewModel> Method getInitializeMethod(ViewModelType viewModel) { for (Method method : viewModel.getClass().getDeclaredMethods()) { if(method.isAnnotationPresent(Initialize.class)) { <START> method.setAccessible(true); <END> return method; } } return null; }</code><technical_language>If change accessibility of method need reset invokation. For this reason I remove this line 409 instead change invokation logic line 405. this: java AccessController.doPrivileged((PrivilegedAction)() -> { boolean wasAccessible = initMethod.isAccessible(); try { return initMethod.invoke(viewModel); } catch (InvocationTargetException | IllegalAccessException e) { throw ... } finally { initMethod.setAccessible(wasAccessible); } }); For Fields convinient helper methods for this usecase in ReflectionUtils. For usecase method public static <T> T accessField(final Field field, final Callable<T> callable, String errorMessage) line 109 in ReflectionUtils suitable. However, moment this method is targeted for Fields for Methods. change Type of parameter java.lang.reflect.AccessibleObject includes Field Method need. I if familiar reflection API able do this refactoring? If not, problem, I this task</technical_language>

Target:
private static <ViewModelType extends ViewModel> Method getInitializeMethod(ViewModelType viewModel) { for (Method method : viewModel.getClass().getDeclaredMethods()) { if(method.isAnnotationPresent(Initialize.class)) { return method; } } return null; }
Source:
<code>public void setText (String string) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.SEPARATOR) != 0) return; if (text.equals (string)) return; super.setText (string); String accelString = ""; int index = string.indexOf ('\t'); if (index != -1) { boolean isRTL = (parent.style & SWT.RIGHT_TO_LEFT) != 0; accelString = (isRTL? "" : " ") + string.substring (index+1, string.length()) + (isRTL? " " : ""); string = string.substring (0, index); } char chars = fixMnemonic (string); byte buffer = Converter.wcsToMbcs (null, chars, true); long label = OS.gtk_bin_get_child (handle); if (label != 0 && OS.GTK_IS_LABEL(label)) { OS.gtk_label_set_text_with_mnemonic (label, buffer); if (OS.GTK_IS_ACCEL_LABEL(label)) { if (OS.GTK3) { OS.gtk_accel_label_set_accel_widget(label, handle); MaskKeysym maskKeysym = getMaskKeysym(); <START> if (maskKeysym != null) { <END> OS.gtk_accel_label_set_accel(label, maskKeysym.keysym, maskKeysym.mask); } } else { buffer = Converter.wcsToMbcs (null, accelString, true); long ptr = OS.g_malloc (buffer.length); OS.memmove (ptr, buffer, buffer.length); long oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label); OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr); if (oldPtr != 0) OS.g_free (oldPtr); } } } }</code><technical_language>Need version checked for GTK 3.6 newer</technical_language>

Target:
public void setText (String string) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.SEPARATOR) != 0) return; if (text.equals (string)) return; super.setText (string); String accelString = ""; int index = string.indexOf ('\t'); if (index != -1) { boolean isRTL = (parent.style & SWT.RIGHT_TO_LEFT) != 0; accelString = (isRTL? "" : " ") + string.substring (index+1, string.length()) + (isRTL? " " : ""); string = string.substring (0, index); } char chars = fixMnemonic (string); byte buffer = Converter.wcsToMbcs (null, chars, true); long label = OS.gtk_bin_get_child (handle); if (label != 0 && OS.GTK_IS_LABEL(label)) { OS.gtk_label_set_text_with_mnemonic (label, buffer); if (OS.GTK_IS_ACCEL_LABEL(label)) { if (OS.GTK3) { OS.gtk_accel_label_set_accel_widget(label, handle); if (OS.GTK_VERSION >= OS.VERSION(3, 6, 0)) { MaskKeysym maskKeysym = getMaskKeysym(); if (maskKeysym != null) { OS.gtk_accel_label_set_accel(label, maskKeysym.keysym, maskKeysym.mask); } } } else { buffer = Converter.wcsToMbcs (null, accelString, true); long ptr = OS.g_malloc (buffer.length); OS.memmove (ptr, buffer, buffer.length); long oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label); OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr); if (oldPtr != 0) OS.g_free (oldPtr); } } } }
Source:
<code>public void should_time_out_if_first_node_takes_too_long_to_respond() throws Exception { RequestHandlerTestHarness.Builder harnessBuilder = RequestHandlerTestHarness.builder(); PoolBehavior node1Behavior = harnessBuilder.customBehavior(node1); node1Behavior.setWriteSuccess(); try (RequestHandlerTestHarness harness = harnessBuilder.build()) { CqlRequestAsyncHandler requestHandler = new CqlRequestAsyncHandler( UNDEFINED_IDEMPOTENCE_STATEMENT, harness.getSession(), harness.getContext(), "test"); <START> CompletionStage<AsyncResultSet> resultSetFuture = requestHandler.handle(); <END> Timeout requestTimeout = harness.nextScheduledTimeout(); requestTimeout.task().run(requestTimeout); assertThatStage(resultSetFuture) .isFailed(t -> assertThat(t).isInstanceOf(DriverTimeoutException.class)); } }</code><technical_language>reason extract requestHandler variable in this test</technical_language>

Target:
public void should_time_out_if_first_node_takes_too_long_to_respond() throws Exception { RequestHandlerTestHarness.Builder harnessBuilder = RequestHandlerTestHarness.builder(); PoolBehavior node1Behavior = harnessBuilder.customBehavior(node1); node1Behavior.setWriteSuccess(); try (RequestHandlerTestHarness harness = harnessBuilder.build()) { CompletionStage<AsyncResultSet> resultSetFuture = new CqlRequestAsyncHandler( UNDEFINED_IDEMPOTENCE_STATEMENT, harness.getSession(), harness.getContext(), "test") .handle(); CapturedTimeout requestTimeout = harness.nextScheduledTimeout(); Duration configuredTimeoutDuration = harness .getContext() .getConfig() .getDefaultProfile() .getDuration(DefaultDriverOption.REQUEST_TIMEOUT); assertThat(requestTimeout.getDelay(TimeUnit.NANOSECONDS)) .isEqualTo(configuredTimeoutDuration.toNanos()); requestTimeout.task().run(requestTimeout); assertThatStage(resultSetFuture) .isFailed(t -> assertThat(t).isInstanceOf(DriverTimeoutException.class)); } }
Source:
<code>public WorkflowEvent getEvent(String id) { List<WorkflowListener> workflowListenerList = WorkflowServiceDataHolder.getInstance().getWorkflowListenerList(); for (WorkflowListener workflowListener : workflowListenerList) { workflowListener.doPreGetEvent(id); } WorkflowRequestHandler requestHandler = WorkflowServiceDataHolder.getInstance().getRequestHandler(id); if (requestHandler != null) { WorkflowEvent event = new WorkflowEvent(); event.setEventId(requestHandler.getEventId()); event.setEventFriendlyName(requestHandler.getFriendlyName()); event.setEventDescription(requestHandler.getDescription()); event.setEventCategory(requestHandler.getCategory()); if (requestHandler.getParamDefinitions() != null) { Parameter[] parameters = new Parameter[requestHandler.getParamDefinitions().size()]; int i = 0; for (Map.Entry<String, String> paramEntry : requestHandler.getParamDefinitions().entrySet()) { Parameter parameter = new Parameter(); parameter.setParamName(paramEntry.getKey()); parameter.setParamValue(paramEntry.getValue()); parameters[i] = parameter; i++; } event.setParameters(parameters); } for (WorkflowListener workflowListener : workflowListenerList) { workflowListener.doPostGetEvent(id); <START> } <END> return event; } return null; }</code><technical_language>listener execution condition block. assign result a local variable return later</technical_language>

Target:
public WorkflowEvent getEvent(String id) { List<WorkflowListener> workflowListenerList = WorkflowServiceDataHolder.getInstance().getWorkflowListenerList(); for (WorkflowListener workflowListener : workflowListenerList) { workflowListener.doPreGetEvent(id); } WorkflowRequestHandler requestHandler = WorkflowServiceDataHolder.getInstance().getRequestHandler(id); WorkflowEvent event = null; if (requestHandler != null) { event = new WorkflowEvent(); event.setEventId(requestHandler.getEventId()); event.setEventFriendlyName(requestHandler.getFriendlyName()); event.setEventDescription(requestHandler.getDescription()); event.setEventCategory(requestHandler.getCategory()); if (requestHandler.getParamDefinitions() != null) { Parameter[] parameters = new Parameter[requestHandler.getParamDefinitions().size()]; int i = 0; for (Map.Entry<String, String> paramEntry : requestHandler.getParamDefinitions().entrySet()) { Parameter parameter = new Parameter(); parameter.setParamName(paramEntry.getKey()); parameter.setParamValue(paramEntry.getValue()); parameters[i] = parameter; i++; } event.setParameters(parameters); } } for (WorkflowListener workflowListener : workflowListenerList) { workflowListener.doPostGetEvent(id, event); } return event; }
Source:
<code>public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { String msg = "Control channel caught exception event: "; if (LOGGER.isDebugEnabled()) { LOGGER.debug(msg, e.getCause()); <START> e.getCause().printStackTrace(); <END> } else { LOGGER.info(msg + e.getCause()); } }</code><technical_language>is this debug code in</technical_language>

Target:
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { String msg = "Control channel caught exception event: "; if (LOGGER.isDebugEnabled()) { LOGGER.debug(msg, e.getCause()); } else { LOGGER.info(msg + e.getCause()); } }
Source:
<code>public void clearPushRegistrationId(String registrationId) { <START> if(mPersistentIdentity.getPushId() == registrationId) { <END> mPersistentIdentity.clearPushId(); } remove("$android_devices", registrationId); }</code><technical_language>check for equality reference? equals. thx</technical_language>

Target:
public void clearPushRegistrationId(String registrationId) { if (registrationId.equalsToString(mPersistentIdentity.getPushId())) { mPersistentIdentity.clearPushId(); } remove("$android_devices", registrationId); }
Source:
<code>public ServiceTaskUploadFormViewImpl() { this.setTitle(Constants.INSTANCE.ServiceTaskUpload()); this.setBody(doUploadForm()); <START> this.add(new ModalFooter() {{ <END> add(new Button(Constants.INSTANCE.Cancel()) {{ addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { hide(); } }); }}); }}); }</code><technical_language>in some places, I prefer avoid this code style class add</technical_language>

Target:
public ServiceTaskUploadFormViewImpl() { this.setTitle(Constants.INSTANCE.ServiceTaskUpload()); this.setBody(doUploadForm()); ModalFooter footer = new ModalFooter(); Button cancelButton = new Button(Constants.INSTANCE.Cancel()); cancelButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { hide(); } }); footer.add(cancelButton); this.add(footer); }
Source:
<code>public static Function<GHEventsSubscriber, Void> processEvent(final GHEvent event, final String payload) { return new Function<GHEventsSubscriber, Void>() { @Override public Void apply(GHEventsSubscriber subscriber) { Validate.notNull(subscriber); try { <START> subscriber.onEvent(event, payload); <END> } catch (Throwable t) { LOGGER.error("Subscriber failed to process hook, skipping...", subscriber.getClass().getName(), event, t); } } }; }</code><technical_language>why</technical_language>

Target:
public static Function<GHEventsSubscriber, Void> processEvent(final GHEvent event, final String payload) { return new Function<GHEventsSubscriber, Void>() { @Override public Void apply(GHEventsSubscriber subscriber) { try { notNull(subscriber).onEvent(event, payload); } catch (Error error) { throw error; } catch (Throwable t) { LOGGER.error("Subscriber failed to process hook, skipping...", subscriber.getClass().getName(), event, t); } return null; } }; }
Source:
<code>public byte[] getFileDiff(String projectRoot, String filepath, String commitHash) throws UnableToGetCommitContentException { if (filepath.isEmpty()) { return new byte[0]; } try (Git git = Git.open(new java.io.File(projectRoot))) { ObjectId commitId = ObjectId.fromString(commitHash); RevCommit commit; try (RevWalk revWalk = new RevWalk(git.getRepository())) { commit = revWalk.parseCommit(commitId); } RevCommit firstParent = commit.getParent(0); byte[] fpRawContent = BlobUtils.getRawContent(git.getRepository(), firstParent, filepath); RawText rt1; if (fpRawContent != null) { rt1 = new RawText(fpRawContent); } else { rt1 = new RawText(new byte[0]); } byte[] rawContent = BlobUtils.getRawContent(git.getRepository(), commit, filepath); RawText rt2; if (rawContent != null && rawContent.length != 0) { rt2 = new RawText(BlobUtils.getRawContent(git.getRepository(), commit, filepath)); } else { <START> rt2 = new RawText(new byte[] {'\n'}); <END> } ByteArrayOutputStream out = new ByteArrayOutputStream(); new DiffFormatter(out) .format(new HistogramDiff().diff(RawTextComparator.DEFAULT, rt1, rt2), rt1, rt2); return out.toByteArray(); } catch (IOException e) { throw new UnableToGetCommitContentException(e.getMessage()); } }</code><technical_language><LINK_0></technical_language>

Target:
public byte[] getFileDiff(String projectRoot, String filepath, String commitHash) { if (filepath.isEmpty()) { return new byte[0]; } try (Git git = Git.open(new java.io.File(projectRoot))) { ObjectId commitId = ObjectId.fromString(commitHash); RevCommit commit; try (RevWalk revWalk = new RevWalk(git.getRepository())) { commit = revWalk.parseCommit(commitId); } byte[] fpRawContent; if (commit.getParentCount() > 0) { fpRawContent = BlobUtils.getRawContent(git.getRepository(), commit.getParent(0), filepath); } else { fpRawContent = new byte[] {'\n'}; } RawText rt1; if (fpRawContent != null) { rt1 = new RawText(fpRawContent); } else { rt1 = new RawText(new byte[0]); } byte[] rawContent = BlobUtils.getRawContent(git.getRepository(), commit, filepath); RawText rt2; if (rawContent != null && rawContent.length != 0) { rt2 = new RawText(BlobUtils.getRawContent(git.getRepository(), commit, filepath)); } else { rt2 = new RawText(new byte[] {'\n'}); } ByteArrayOutputStream out = new ByteArrayOutputStream(); new DiffFormatter(out) .format(new HistogramDiff().diff(RawTextComparator.DEFAULT, rt1, rt2), rt1, rt2); return out.toByteArray(); } catch (IOException e) { throw new UnableToGetCommitContentException(e.getMessage()); } }
Source:
<code>List<Task<? extends Serializable>> tasks(TaskTracker tracker) { List<Task<? extends Serializable>> tasks = new ArrayList<>(); Iterator<DirCopyWork> itr = work.getPathsToCopyIterator(); int numTaskCanBeAdded = tracker.numTaskCanBeAdded(); Task<? extends Serializable> barrierTask = TaskFactory.get(new DependencyCollectionWork(), conf); while (numTaskCanBeAdded-- > 0 && itr.hasNext()) { DirCopyWork dirCopyWork = itr.next(); Task<DirCopyWork> task = TaskFactory.get(dirCopyWork, conf); tasks.add(task); barrierTask.addDependentTask(task); LOG.debug("added task for {}", dirCopyWork); } if (!tasks.isEmpty()) { tracker.addDependentTask(barrierTask); <START> tracker.addTaskList(tasks); <END> return Collections.singletonList(barrierTask); } else { return tasks; } }</code><technical_language>do need this, tasks added dependents barrier task</technical_language>

Target:
List<Task<? extends Serializable>> tasks(TaskTracker tracker) { List<Task<? extends Serializable>> tasks = new ArrayList<>(); Iterator<DirCopyWork> itr = work.getPathsToCopyIterator(); while (tracker.canAddMoreTasks() && itr.hasNext()) { DirCopyWork dirCopyWork = itr.next(); Task<DirCopyWork> task = TaskFactory.get(dirCopyWork, conf); tasks.add(task); tracker.addTask(task); LOG.debug("added task for {}", dirCopyWork); } return tasks; }
Source:
<code>public void testCreateIncludedModel() { final String name = "file.dmn"; final String value = "://namespace"; final String path = "/src/path/file"; final IncludedModel includedModel = spy(new IncludedModel(recordEngine)); <START> final Map<String, String> metaData = new HashMap<String, String>() {{ <END> put("path", path); }}; when(view.getModelNameInput()).thenReturn(name); doReturn(includedModel).when(modal).createIncludedModel(); modal.createIncludedModel(new KieAssetsDropdownItem(name, value, metaData)); assertEquals(name, includedModel.getName()); assertEquals(value, includedModel.getNamespace()); assertEquals(path, includedModel.getPath()); verify(includedModel).create(); }</code><technical_language>Please this map initialization: java new Maps.Builder() . put("path", path) .build();</technical_language>

Target:
public void testCreateIncludedModel() { final String name = "file.dmn"; final String value = "://namespace"; final String path = "/src/path/file"; final String anPackage = "path.file.com"; final IncludedModel includedModel = spy(new IncludedModel(recordEngine)); final Map<String, String> metaData = new Maps.Builder<String, String>().put("path", path).build(); when(view.getModelNameInput()).thenReturn(name); doReturn(includedModel).when(modal).createIncludedModel(); modal.createIncludedModel(new KieAssetsDropdownItem(name, anPackage, value, metaData)); assertEquals(name, includedModel.getName()); assertEquals(value, includedModel.getNamespace()); assertEquals(path, includedModel.getPath()); verify(includedModel).create(); }
Source:
<code>public void incAndReport() { <START> this.exported++; <END> Integer percentage = (int) (exported * 100 / total); if (percentage > lastReportedPercentage && percentage % 10 == 0) { EventBus.publish(ExportEvent.progress(form, percentage.doubleValue() / 100)); lastReportedPercentage = percentage; } }</code><technical_language>want "this."</technical_language>

Target:
public void incAndReport() { exported++; int percentage = (int) (exported * 100 / total); if (percentage > lastReportedPercentage && percentage % STEP_SIZE == 0) { EventBus.publish(ExportEvent.progress(form, percentage / 100D)); lastReportedPercentage = percentage; } }
Source:
<code>public DroolsAbstractBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_, A, B> parent) { super(constraintFactory); if (parent == null && !(this instanceof DroolsJoinBiConstraintStream)) { <START> throw new IllegalArgumentException("Parent of stream (" + this + ") must not be null, of not join stream."); <END> } this.parent = parent; }</code><technical_language>typo: of -></technical_language>

Target:
public DroolsAbstractBiConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractBiConstraintStream<Solution_, A, B> parent) { super(constraintFactory); if (parent == null && !(this instanceof DroolsJoinBiConstraintStream)) { throw new IllegalArgumentException("Parent of stream (" + this + ") must not be null, or not join stream."); } this.parent = parent; }
Source:
<code>protected void testAccessControl() throws Exception { InstructorAttributes instructor = typicalBundle.instructors.get("instructor1OfCourse1"); String courseId = instructor.courseId; <START> String courseName = CoursesLogic.inst().getCourse(courseId).getName(); <END> String courseTimeZone = "UTC"; String[] submissionParams = new String[]{ Const.ParamsNames.COURSE_ID, courseId, Const.ParamsNames.COURSE_NAME, courseName, Const.ParamsNames.COURSE_TIME_ZONE, courseTimeZone }; verifyOnlyInstructorsOfTheSameCourseCanAccess(submissionParams); verifyUnaccessibleWithoutModifyStudentPrivilege(submissionParams); }</code><technical_language>courseName need loaded CoursesLogic</technical_language>

Target:
protected void testAccessControl() throws Exception { InstructorAttributes instructor = typicalBundle.instructors.get("instructor1OfCourse1"); String courseId = instructor.courseId; String courseName = "Typical Course 1 with 2 Evals"; String courseTimeZone = "UTC"; String[] submissionParams = new String[]{ Const.ParamsNames.COURSE_ID, courseId, Const.ParamsNames.COURSE_NAME, courseName, Const.ParamsNames.COURSE_TIME_ZONE, courseTimeZone }; verifyOnlyInstructorsOfTheSameCourseCanAccess(submissionParams); verifyUnaccessibleWithoutModifyCoursePrivilege(submissionParams); }
Source:
<code>public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { <START> Optional<A> optional = findAnnotation(context.getElement(), annotationType); if (optional.isPresent()) { A annotation = optional.get(); String customReason = customDisabledReason.apply(annotation); return isEnabled(annotation) ? enabled(enabledReason) : disabled(disabledReason, customReason); } return enabledByDefault(); <END> }</code><technical_language>I this, i thought i drop cents .isPresent()-.get()-combination - i do nicer more Optional-API-ish way. :) suggestion return findAnnotation(context.getElement(), annotationType) .map(annotation -> { String customReason = customDisabledReason.apply(annotation); return isEnabled(annotation) ? enabled(enabledReason) : disabled(disabledReason, customReason); }) .orElseGet(this::enabledByDefault); }</technical_language>

Target:
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { return findAnnotation(context.getElement(), annotationType) .map(annotation -> isEnabled(annotation) ? enabled(enabledReason) : disabled(disabledReason, customDisabledReason.apply(annotation))) .orElseGet(this::enabledByDefault); }
Source:
<code><START> public void testNotEquals() <END> { assertFunction("IPADDRESS'2001:0db8:0000:0000:0000:ff00:0042:8329' != IPADDRESS'1.2.3.4'", BOOLEAN, true); assertFunction("CAST('1.2.3.4' AS IPADDRESS) <> CAST('1.2.3.5' AS IPADDRESS)", BOOLEAN, true); }</code><technical_language>Test some other IPv4-in-IPv6 ranges. find in table in RFC6890 (linked in issue)</technical_language>

Target:
public void testNotEquals() { assertFunction("IPADDRESS '2001:0db8:0000:0000:0000:ff00:0042:8329' != IPADDRESS '1.2.3.4'", BOOLEAN, true); assertFunction("CAST('1.2.3.4' AS IPADDRESS) <> CAST('1.2.3.5' AS IPADDRESS)", BOOLEAN, true); assertFunction("CAST('1.2.3.4' AS IPADDRESS) != IPADDRESS '1.2.3.4'", BOOLEAN, false); assertFunction("IPADDRESS '2001:0db8:0000:0000:0000:ff00:0042:8329' <> IPADDRESS '2001:db8::ff00:42:8329'", BOOLEAN, false); assertFunction("CAST('1.2.3.4' AS IPADDRESS) <> CAST('::ffff:1.2.3.4' AS IPADDRESS)", BOOLEAN, false); }
Source:
<code>public PartitionedOutputOperator( OperatorContext operatorContext, List<Type> sourceTypes, Function<Page, Page> pagePreprocessor, PartitionFunction partitionFunction, List<Integer> partitionChannels, List<Optional<ConstantExpression>> partitionConstants, boolean replicatesAnyRow, OptionalInt nullChannel, OutputBuffer outputBuffer, PagesSerdeFactory serdeFactory, DataSize maxMemory) { this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); this.pagePreprocessor = requireNonNull(pagePreprocessor, "pagePreprocessor is null"); this.partitionFunction = new PagePartitioner( partitionFunction, partitionChannels, partitionConstants, replicatesAnyRow, nullChannel, outputBuffer, serdeFactory, sourceTypes, maxMemory, <START> operatorContext.getDriverContext().getLifespan(), <END> operatorContext); operatorContext.setInfoSupplier(this::getInfo); this.systemMemoryContext = operatorContext.newLocalSystemMemoryContext(PartitionedOutputOperator.class.getSimpleName()); this.partitionsInitialRetainedSize = this.partitionFunction.getRetainedSizeInBytes(); this.systemMemoryContext.setBytes(partitionsInitialRetainedSize); }</code><technical_language>need pass this anymore. acquired operatorContext passed in</technical_language>

Target:
public PartitionedOutputOperator( OperatorContext operatorContext, List<Type> sourceTypes, Function<Page, Page> pagePreprocessor, PartitionFunction partitionFunction, List<Integer> partitionChannels, List<Optional<ConstantExpression>> partitionConstants, boolean replicatesAnyRow, OptionalInt nullChannel, OutputBuffer outputBuffer, PagesSerdeFactory serdeFactory, DataSize maxMemory) { this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); this.pagePreprocessor = requireNonNull(pagePreprocessor, "pagePreprocessor is null"); this.partitionFunction = new PagePartitioner( partitionFunction, partitionChannels, partitionConstants, replicatesAnyRow, nullChannel, outputBuffer, serdeFactory, sourceTypes, maxMemory, operatorContext); operatorContext.setInfoSupplier(this::getInfo); this.systemMemoryContext = operatorContext.newLocalSystemMemoryContext(PartitionedOutputOperator.class.getSimpleName()); this.partitionsInitialRetainedSize = this.partitionFunction.getRetainedSizeInBytes(); this.systemMemoryContext.setBytes(partitionsInitialRetainedSize); }
Source:
<code>private boolean canPasteAll(IJavaElement destination) { for (TypedSource <START> fSource : <END> fSources) { if (!canPaste(fSource.getType(), destination)) { return false; } } return true; }</code><technical_language>rename source</technical_language>

Target:
private boolean canPasteAll(IJavaElement destination) { for (TypedSource source : fSources) { if (!canPaste(source.getType(), destination)) { return false; } } return true; }
Source:
<code>private static void waitUntilFinished(FluoConfiguration config) { try (Environment env = new Environment(config)) { List<TableRange> ranges = getRanges(env); outer: while (true) { long ts1 = env.getSharedResources().getOracleClient().getStamp().getTxTimestamp(); for (TableRange range : ranges) { boolean sawNotifications = waitTillNoNotifications(env, range); if (sawNotifications) { ranges = getRanges(env); continue outer; } } long ts2 = env.getSharedResources().getOracleClient().getStamp().getTxTimestamp(); <START> if (ts1 == (ts2 - 1)) { <END> break; } } } catch (Exception e) { log.error("An exception was thrown -", e); System.exit(-1); } }</code><technical_language>ts2 - ts1 == 1 is slightly more readable</technical_language>

Target:
private static void waitUntilFinished(FluoConfiguration config) { try (Environment env = new Environment(config)) { List<TableRange> ranges = getRanges(env); outer: while (true) { long ts1 = env.getSharedResources().getOracleClient().getStamp().getTxTimestamp(); for (TableRange range : ranges) { boolean sawNotifications = waitTillNoNotifications(env, range); if (sawNotifications) { ranges = getRanges(env); continue outer; } } long ts2 = env.getSharedResources().getOracleClient().getStamp().getTxTimestamp(); if (ts2 - ts1 == 1) { break; } } } catch (Exception e) { log.error("An exception was thrown -", e); System.exit(-1); } }
Source:
<code>public void validateUpdateDatastreams(List<Datastream> datastreams, List<Datastream> allDatastreams) throws DatastreamValidationException { <START> _connector.validateUpdateDatastreams(datastreams, allDatastreams); <END> }</code><technical_language>add logApiStart/logApiEnd</technical_language>

Target:
public void validateUpdateDatastreams(List<Datastream> datastreams, List<Datastream> allDatastreams) throws DatastreamValidationException { logApiStart("validateUpdateDatastreams"); _connector.validateUpdateDatastreams(datastreams, allDatastreams); logApiEnd("validateUpdateDatastreams"); }
Source:
<code><START> public void saveAccount(String accountName) { <END> if (accountName == null || accountName.isEmpty()) return; SharedPreferences prefs = mContext.getSharedPreferences(KEY_SHARED_PREF_ACCOUNT_LIST, Activity.MODE_PRIVATE); String accountList = prefs.getString(KEY_APP_ACCOUNTS_FOR_TOKEN_REMOVAL, ""); accountList += KEY_ACCOUNT_LIST_DELIM + accountName; Editor prefsEditor = prefs.edit(); prefsEditor.putString(KEY_APP_ACCOUNTS_FOR_TOKEN_REMOVAL, accountList); prefsEditor.apply(); }</code><technical_language>saveAccount adding time</technical_language>

Target:
public void saveAccount(String accountName) { if (accountName == null || accountName.isEmpty()) return; SharedPreferences prefs = mContext.getSharedPreferences(KEY_SHARED_PREF_ACCOUNT_LIST, Activity.MODE_PRIVATE); String accountList = prefs.getString(KEY_APP_ACCOUNTS_FOR_TOKEN_REMOVAL, ""); if (!accountList.contains(KEY_ACCOUNT_LIST_DELIM + accountName)) { accountList += KEY_ACCOUNT_LIST_DELIM + accountName; Editor prefsEditor = prefs.edit(); prefsEditor.putString(KEY_APP_ACCOUNTS_FOR_TOKEN_REMOVAL, accountList); prefsEditor.apply(); } }
Source:
<code>private CommentModel getComment(int position) { <START> if (position == getCount() - 1) { <END> mOnLoadMoreListener.onLoadMore(); } return mCommentList.get(position); }</code><technical_language>this point I assume mOnLoadMoreListener null, if this fragment guarantee null. recommend handling that</technical_language>

Target:
private CommentModel getComment(int position) { if (position == getCount() - 1 && mOnLoadMoreListener != null) { mOnLoadMoreListener.onLoadMore(); } return mCommentList.get(position); }
Source:
<code>private void setCustomServerWithNoUrl() { SharedPreferences userPreferences = AnkiDroidApp.getSharedPrefs(AnkiDroidApp.getInstance()); <START> userPreferences.edit().putBoolean("useCustomSyncServer", true).commit(); <END> }</code><technical_language>out of curiosity SharedPreferences, commit apply? I scanned apply (correctly, I believe) in PreferenceBackedHostNum, I apply fine well. For reasons commit is typically unnecessary slow down, I unnecessary slow testing here, learn SharedPreferences, I read wrong</technical_language>

Target:
private void setCustomServerWithNoUrl() { SharedPreferences userPreferences = AnkiDroidApp.getSharedPrefs(AnkiDroidApp.getInstance()); userPreferences.edit().putBoolean("useCustomSyncServer", true).apply(); }
Source:
<code>public ApiResponse usage(Map options) throws Exception { if (options == null) options = ObjectUtils.emptyMap(); Map params = ObjectUtils.only(options, "date"); Object date = params.get("date"); <START> if (date instanceof Date) { <END> params.put("date", ObjectUtils.toUsageApiDateFormat((Date)date)); } return callApi(HttpMethod.GET, Arrays.asList("usage"), params, options); }</code><technical_language>if a String in right format</technical_language>

Target:
public ApiResponse usage(Map options) throws Exception { if (options == null) options = ObjectUtils.emptyMap(); final List<String> uri = new ArrayList<String>(); uri.add("usage"); Object date = options.get("date"); if (date != null) { if (date instanceof Date) { date = ObjectUtils.toUsageApiDateFormat((Date) date); } uri.add(date.toString()); } return callApi(HttpMethod.GET, uri, ObjectUtils.emptyMap(), options); }