auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void drawItemStackAt(ItemStack stack, int x, int y) { RenderHelper.enableGUIStandardItemLighting(); <START> RenderHelper.disableStandardItemLighting(); <END> itemRender.renderItemAndEffectIntoGUI(mc.thePlayer, stack, x, y); itemRender.renderItemOverlayIntoGUI(mc.fontRendererObj, stack, x, y, null); }</code><technical_language>do need enable disable? In theory call disable work (provided direct GL11 calls anywhere)</technical_language>

Target:
protected void drawItemStackAt(ItemStack stack, int x, int y) { RenderHelper.enableGUIStandardItemLighting(); itemRender.renderItemAndEffectIntoGUI(mc.thePlayer, stack, x, y); itemRender.renderItemOverlayIntoGUI(mc.fontRendererObj, stack, x, y, null); RenderHelper.disableStandardItemLighting(); }
Source:
<code>public Socket open(int socketTimeout) throws IOException { boolean isHttpProxy = false; InetSocketAddress targetAddress = null; SocketChannel channel = null; try { targetAddress = JnlpAgentEndpointResolver.getResolvedHttpProxyAddress(host, port); if (targetAddress == null) { targetAddress = new InetSocketAddress(host, port); } else { isHttpProxy = true; } channel = SocketChannel.open(targetAddress); Socket socket = channel.socket(); socket.setTcpNoDelay(true); socket.setSoTimeout(socketTimeout); if (isHttpProxy) { String connectCommand = String.format("CONNECT %s:%s HTTP/1.1\r\nHost: %s\r\n\r\n", host, port, host); socket.getOutputStream().write(connectCommand.getBytes("UTF-8")); BufferedInputStream is = new BufferedInputStream(socket.getInputStream()); String line = readLine(is); String[] responseLineParts = line.split(" "); if (responseLineParts.length < 2 || !responseLineParts[1].equals("200")) throw new IOException("Got a bad response from proxy: " + line); while (!readLine(is).isEmpty()) { } } return socket; } catch (IOException e) { <START> IOUtils.closeQuietly(channel); <END> String suffix = ""; if (isHttpProxy) { suffix = " through proxy " + targetAddress.toString(); } throw new IOException("Failed to connect to " + host + ':' + port + suffix, e); } }</code><technical_language>Generally need closeQuietly() implementation, prints message logger</technical_language>

Target:
public Socket open(int socketTimeout) throws IOException { boolean isHttpProxy = false; InetSocketAddress targetAddress = null; SocketChannel channel = null; try { targetAddress = JnlpAgentEndpointResolver.getResolvedHttpProxyAddress(host, port); if (targetAddress == null) { targetAddress = new InetSocketAddress(host, port); } else { isHttpProxy = true; } channel = SocketChannel.open(targetAddress); Socket socket = channel.socket(); socket.setTcpNoDelay(true); socket.setSoTimeout(socketTimeout); if (isHttpProxy) { String connectCommand = String.format("CONNECT %s:%s HTTP/1.1\r\nHost: %s\r\n\r\n", host, port, host); socket.getOutputStream() .write(connectCommand.getBytes("UTF-8")); BufferedInputStream is = new BufferedInputStream(socket.getInputStream()); String line = readLine(is); String[] responseLineParts = line.split(" "); if (responseLineParts.length < 2 || !responseLineParts[1].equals("200")) { throw new IOException("Got a bad response from proxy: " + line); } while (!readLine(is).isEmpty()) { } } return socket; } catch (IOException e) { if (channel != null) { try { channel.close(); } catch (IOException suppressed) { e = ThrowableUtils.addSuppressed(e, suppressed); } } String suffix = ""; if (isHttpProxy) { suffix = " through proxy " + targetAddress.toString(); } throw new IOException("Failed to connect to " + host + ':' + port + suffix, e); } }
Source:
<code>public void testUpdateToolPathDockerfile() throws IOException, TimeoutException, ApiException { <START> ApiClient client = getWebClient(); <END> UsersApi usersApi = new UsersApi(client); final Long userId = usersApi.getUser().getId(); usersApi.refresh(userId); ContainersApi toolsApi = new ContainersApi(client); final PublishRequest publishRequest = new PublishRequest(); publishRequest.setPublish(true); DockstoreTool c = getContainer(); DockstoreTool toolTest = toolsApi.registerManual(c); toolsApi.refresh(toolTest.getId()); toolTest.setDefaultDockerfilePath("/test1/Dockerfile"); toolsApi.updateTagContainerPath(toolTest.getId(),toolTest); toolsApi.refresh(toolTest.getId()); final CommonTestUtilities.TestingPostgres testingPostgres = getTestingPostgres(); final Long toolID = testingPostgres.runSelectStatement("select id from tool where name = 'testUpdatePath'", new ScalarHandler<>()); final Long tagID = testingPostgres.runSelectStatement("select tagid from tool_tag where toolid = "+toolID, new ScalarHandler<>()); final String path = testingPostgres.runSelectStatement("select dockerfilepath from tag where id = "+tagID, new ScalarHandler<>()); Assert.assertTrue("the cwl path should be changed to /test1/Dockerfile", path.equals("/test1/Dockerfile")); }</code><technical_language>This section of tests highly repetitive, try refactor is easier pick out differences test cases</technical_language>

Target:
public void testUpdateToolPathDockerfile() throws IOException, TimeoutException, ApiException { ContainersApi toolsApi = setupWebService(); DockstoreTool c = getContainer(); DockstoreTool toolTest = toolsApi.registerManual(c); toolsApi.refresh(toolTest.getId()); toolTest.setDefaultDockerfilePath("/test1/Dockerfile"); toolsApi.updateTagContainerPath(toolTest.getId(),toolTest); toolsApi.refresh(toolTest.getId()); final String path = getPathfromDB("dockerfilepath"); Assert.assertTrue("the cwl path should be changed to /test1/Dockerfile", path.equals("/test1/Dockerfile")); }
Source:
<code>public void writeHeaders(HttpServletRequest request, HttpServletResponse response) { <START> headerWriters.forEach(headerWriter -> headerWriter.writeHeaders(request, response)); <END> }</code><technical_language>a quick reminder here, too, this, suggestion this.headerWriters.forEach(headerWriter -> headerWriter.writeHeaders(request, response));</technical_language>

Target:
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) { this.headerWriters.forEach(headerWriter -> headerWriter.writeHeaders(request, response)); }
Source:
<code>public void testScanExerciseInTheWrongPlace() { plugin.scanExercise(simpleAllTestsPassProject, "ar.R"); Path availablePointsJson = simpleAllTestsPassProject.resolve(".available_points.json"); ImmutableList<TestDesc> re = null; try { re = new RExerciseDescParser(availablePointsJson).parse(); <START> } catch (IOException e) { <END> System.out.println("Something wrong: " + e.getMessage()); } assertTrue(re == null); }</code><technical_language>throw this exception test. this method a bit cleaner</technical_language>

Target:
public void testScanExerciseInTheWrongPlace() throws IOException { plugin.scanExercise(simpleAllTestsPassProject, "ar.R"); Path availablePointsJson = simpleAllTestsPassProject.resolve(".available_points.json"); exception.expect(IOException.class); new RExerciseDescParser(availablePointsJson).parse(); }
Source:
<code>private void execute(final EventualMessage msg, final ActorProcessingThread currentThread, final WebDebugger dbg, final int i) { currentThread.currentMessage = msg; <START> if (actor instanceof TracingActor) { <END> TracingActor.handleBreakpointsAndStepping(msg, dbg, actor); } if (i >= 0 && VmSettings.MESSAGE_TIMESTAMPS) { executionTimeStamps[i] = System.currentTimeMillis(); } try { msg.execute(); } finally { if (VmSettings.ACTOR_TRACING) { currentThread.currentMessageId += 1; } } }</code><technical_language>other code checks if (VmSettings.ACTOR_TRACING), do do else</technical_language>

Target:
private void execute(final EventualMessage msg, final ActorProcessingThread currentThread, final WebDebugger dbg, final int i) { currentThread.currentMessage = msg; if (VmSettings.ACTOR_TRACING) { TracingActor.handleBreakpointsAndStepping(msg, dbg, actor); } if (i >= 0 && VmSettings.MESSAGE_TIMESTAMPS) { executionTimeStamps[i] = System.currentTimeMillis(); } try { msg.execute(); } finally { if (VmSettings.ACTOR_TRACING) { currentThread.currentMessageId += 1; } } }
Source:
<code>private FileObject ingestFileObject(ContentObject parent, Resource parentResc, Resource childResc) throws DepositException, IOException { if (skipResumed(childResc)) { <START> return null; <END> } WorkObject work = (WorkObject) parent; FileObject obj = addFileToWork(work, childResc); addIngestionEventForChild(obj); addPremisEvents(obj); addDescription(work); addClicks(1); log.info("Created file object for deposit {}", obj.getPid(), getDepositPID()); return obj; }</code><technical_language>remove return types for ingest methods now</technical_language>

Target:
private void ingestFileObject(ContentObject parent, Resource parentResc, Resource childResc) throws DepositException, IOException { if (skipResumed(childResc)) { return; } WorkObject work = (WorkObject) parent; FileObject obj = addFileToWork(work, childResc); addIngestionEventForChild(obj); addPremisEvents(obj); addDescription(obj); addClicks(1); log.info("Created file object for deposit {}", obj.getPid(), getDepositPID()); }
Source:
<code>public final String getContent() throws IOException { <START> if (content == null || charset == null) { <END> return null; } ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteStreams.copy(new ByteArrayInputStream(content), out); return out.toString(charset.name()); }</code><technical_language>charset == null? if charset is default charset</technical_language>

Target:
public final String getContent() throws IOException { if (content == null) { return null; } return new String(content, charset.name()); }
Source:
<code>public static void setup() { dataStore = new MetaDataStore(); <START> dataStore.populateEntityDictionary(new EntityDictionary(new HashMap<>())); <END> AggregationDictionary dictionary = new AggregationDictionary(new HashMap<>()); dictionary.bindEntity(PlayerStats.class); dictionary.bindEntity(Country.class); dictionary.bindEntity(SubCountry.class); dictionary.bindEntity(PlayerStatsView.class); dictionary.bindEntity(Player.class); dictionary.bindEntity(VideoGame.class); dataStore.storeMetaData(dictionary); }</code><technical_language>this test entity dictionaries? Elide is intended a single dictionary</technical_language>

Target:
public static void setup() { dataStore = new MetaDataStore(); AggregationDictionary dictionary = new AggregationDictionary(new HashMap<>()); dictionary.bindEntity(PlayerStats.class); dictionary.bindEntity(Country.class); dictionary.bindEntity(SubCountry.class); dictionary.bindEntity(PlayerStatsView.class); dictionary.bindEntity(Player.class); dictionary.bindEntity(VideoGame.class); dataStore.storeMetaData(dictionary); }
Source:
<code>public boolean doPreparationsAndCheckCanAccessPrivateData(UUID id) { <START> if (!getUserEntityById(id).canAccessPrivateData()) <END> { return false; } withLockOnUser(id, user -> { boolean updated = doPreparations(user); if (updated) { userAnonymizedService.updateUserAnonymized(user.getAnonymized()); userRepository.save(user); } return null; }); return true; }</code><technical_language>Lock put getUserEntityById</technical_language>

Target:
public boolean doPreparationsAndCheckCanAccessPrivateData(UUID id) { return withLockOnUser(id, user -> { if (!user.canAccessPrivateData()) { return false; } boolean updated = doPreparations(user); if (updated) { userAnonymizedService.updateUserAnonymized(user.getAnonymized()); userRepository.save(user); } return true; }); }
Source:
<code>private Set<K> keySetWithPagingPredicate(Predicate predicate) { PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate); pagingPredicate.setIterationType(IterationType.KEY); ClientMessage request = MapKeySetWithPagingPredicateCodec.encodeRequest(name, toData(predicate)); ClientMessage response = invokeWithPredicate(request, predicate); MapKeySetWithPagingPredicateCodec.ResponseParameters resultParameters = MapKeySetWithPagingPredicateCodec .decodeResponse(response); if (resultParameters.response.isEmpty()) { return Collections.EMPTY_SET; } SerializationService serializationService = getSerializationService(); int size = resultParameters.response.size(); Set<K> keySet = new HashSet<>(size); K lastKey = null; for (int i = 0; i < size; i++) { K key = serializationService.toObject(resultParameters.response.get(i)); keySet.add(key); if (i == size - 1) { lastKey = key; } } <START> resultParameters.response.forEach(data -> keySet.add(serializationService.toObject(data))); <END> pagingPredicate.setAnchor(pagingPredicate.getPage(), new AbstractMap.SimpleImmutableEntry(lastKey, null)); return keySet; }</code><technical_language>this line duplicate for-loop? I removed. Also, border over-engineering, of fact received keys unique in theory, some kind of immutable Set implementation simply wraps received keys hashCode()/equals() addition</technical_language>

Target:
private Set keySetWithPagingPredicate(Predicate predicate) { PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate); pagingPredicate.setIterationType(IterationType.KEY); PagingPredicateHolder pagingPredicateHolder = PagingPredicateHolder.of(predicate, getSerializationService()); ClientMessage request = MapKeySetWithPagingPredicateCodec.encodeRequest(name, pagingPredicateHolder); ClientMessage response = invokeWithPredicate(request, predicate); MapKeySetWithPagingPredicateCodec.ResponseParameters resultParameters = MapKeySetWithPagingPredicateCodec .decodeResponse(response); SerializationService serializationService = getSerializationService(); pagingPredicate.setAnchorList(resultParameters.anchorDataList.asAnchorList(serializationService)); return new UnmodifiableLazySet(resultParameters.response, serializationService); }
Source:
<code>public List<InputSplit> getSplits(JobContext jobContext) throws IOException, InterruptedException { Configuration conf = jobContext.getConfiguration(); URI uri = URI.create(conf.get(FS_URI)); String[] sourcePaths = conf.get(SOURCE_PATHS).split(","); <START> Boolean recursiveCopy = conf.getBoolean(RECURSIVE_COPY, true); <END> FileSystem fileSystem = FileSystem.get(uri, conf); int maxSplitSize = conf.getInt(MAX_SPLIT_SIZE, DEFAULT_MAX_SPLIT_SIZE); List<FileStatus> fileStatuses = new ArrayList<>(); List<String> baseFolders = new ArrayList<>(); for (String prefix : sourcePaths) { try { FileStatus fileStatus = fileSystem.getFileStatus(new Path(prefix)); if (fileStatus.isFile()) { prefix = ""; } recursivelyAddFileStatus(fileStatuses, baseFolders, prefix, fileStatus, recursiveCopy, fileSystem); } catch (Exception e) { LOG.warn(e.getMessage()); } } fileSystem.close(); List<AbstractFileMetadata> fileMetaDataList = getFileMetadaDataList(fileStatuses, baseFolders, fileStatuses.size(), getCredentialsFromConf(conf)); int numSplits = (fileMetaDataList.size() - 1) / maxSplitSize + 1; PriorityQueue<AbstractMetadataInputSplit> abstractInputSplits = new PriorityQueue<>(numSplits); for (int i = 0; i < numSplits; i++) { abstractInputSplits.add(getInputSplit()); } for (int i = 0; i < fileMetaDataList.size(); i++) { AbstractMetadataInputSplit minInputSplit = abstractInputSplits.poll(); minInputSplit.addFileMetadata(fileMetaDataList.get(i)); abstractInputSplits.add(minInputSplit); } List<InputSplit> inputSplits = new ArrayList<>(); inputSplits.addAll(abstractInputSplits); return inputSplits; }</code><technical_language>boolean, null</technical_language>

Target:
public List<InputSplit> getSplits(JobContext jobContext) throws IOException, InterruptedException { Configuration conf = jobContext.getConfiguration(); URI uri = URI.create(conf.get(FS_URI)); String[] sourcePaths = conf.get(SOURCE_PATHS).split(","); boolean recursive = conf.getBoolean(RECURSIVE_COPY, true); FileSystem fileSystem = FileSystem.get(uri, conf); int maxSplitSize = conf.getInt(MAX_SPLIT_SIZE, DEFAULT_MAX_SPLIT_SIZE); List<AbstractFileMetadata> fileMetaDataList = new ArrayList<>(); for (String prefix : sourcePaths) { recursivelyAddFileStatus(fileMetaDataList, prefix, new Path(prefix), recursive, fileSystem, conf); } Collections.sort(fileMetaDataList); Collections.reverse(fileMetaDataList); int numSplits = (fileMetaDataList.size() - 1) / maxSplitSize + 1; PriorityQueue<AbstractMetadataInputSplit> abstractInputSplits = new PriorityQueue<>(numSplits); for (int i = 0; i < numSplits; i++) { abstractInputSplits.add(getInputSplit()); } List<InputSplit> inputSplits = new ArrayList<>(); for (AbstractFileMetadata fileMetadata : fileMetaDataList) { AbstractMetadataInputSplit minInputSplit = abstractInputSplits.poll(); minInputSplit.addFileMetadata(fileMetadata); if (minInputSplit.getLength() < maxSplitSize) { abstractInputSplits.add(minInputSplit); } else { inputSplits.add(minInputSplit); } } inputSplits.addAll(abstractInputSplits); return inputSplits; }
Source:
<code>private static List<ITmfXmlStateAttribute> nullList() { <START> final List<ITmfXmlStateAttribute> empty_LIST = Collections.<ITmfXmlStateAttribute>emptyList(); <END> if (empty_LIST == null) { throw new IllegalStateException(); } return empty_LIST; }</code><technical_language>@NonNull List<> emptyList add suppress warning it, Collections.emptyList() is non-null, unnecessary warning remove this cruft</technical_language>

Target:
private static List<ITmfXmlStateAttribute> nullList() { final List<ITmfXmlStateAttribute> emptyList = Collections.<ITmfXmlStateAttribute>emptyList(); if (emptyList == null) { throw new IllegalStateException(); } return emptyList; }
Source:
<code>private void logSuccessfulMerge(ResourceMapping[] emfMappings) { final List<IResource> iResources = getInvolvedIResources(emfMappings); final MultiStatus multiStatus = new MultiStatus(EMFCompareIDEUIPlugin.PLUGIN_ID, 0, EMFCompareIDEUIMessages.getString("EMFResourceMappingMerger.successfulModelMerge", String.valueOf(iResources.size())), null); for (IResource iResource : iResources) { final Status status = new Status(IStatus.OK, EMFCompareIDEUIPlugin.PLUGIN_ID, iResource .getFullPath().toOSString()); multiStatus.add(status); } log(multiStatus); <START> } <END></code><technical_language>I logStartingMerge logSuccessfulMerge refactored method more generic receives (at least) message key a parameter. I introduce a more global logging strategy, allow monitor easily duration of step in a comparison treatment for instance, extensions involved, on. this in another patch. I this topic require more broader work in future</technical_language>

Target:
private void logSuccessfulMerge(ResourceMapping[] emfMappings) { logMessageWithEMFMappings("EMFResourceMappingMerger.successfulModelMerge", emfMappings); }
Source:
<code>private ChannelHandler replace( Predicate<AbstractChannelHandlerContext> predicate, String newName, ChannelHandler newHandler) { checkMultiplicity(newHandler); if (newName == null) { newName = generateName(newHandler); } AbstractChannelHandlerContext oldCtx; AbstractChannelHandlerContext newCtx = newContext(newName, newHandler); final int idx; synchronized (handlers) { idx = findCtxIdx(predicate); if (idx == -1) { throw new NoSuchElementException(); } oldCtx = handlers.get(idx); assert oldCtx != head && oldCtx != tail && oldCtx != null; if (!oldCtx.name().equals(newName)) { if (context(newName) != null) { throw new IllegalArgumentException("Duplicate handler name: " + newName); } } AbstractChannelHandlerContext removed = handlers.remove(idx); assert removed != null; <START> handlers.add(idx, newCtx); <END> } EventExecutor executor = executor(); if (executor.inEventLoop()) { replace0(oldCtx, newCtx); } else { try { executor.execute(() -> replace0(oldCtx, newCtx)); } catch (Throwable cause) { synchronized (handlers) { handlers.remove(idx); handlers.add(idx, oldCtx); } throw cause; } } return oldCtx.handler(); }</code><technical_language>removed = handlers.set(idx, newCtx) here</technical_language>

Target:
private ChannelHandler replace( Predicate<AbstractChannelHandlerContext> predicate, String newName, ChannelHandler newHandler) { checkMultiplicity(newHandler); if (newName == null) { newName = generateName(newHandler); } AbstractChannelHandlerContext oldCtx; AbstractChannelHandlerContext newCtx = newContext(newName, newHandler); EventExecutor executor = executor(); boolean inEventLoop = executor.inEventLoop(); synchronized (handlers) { int idx = findCtxIdx(predicate); if (idx == -1) { throw new NoSuchElementException(); } oldCtx = handlers.get(idx); assert oldCtx != head && oldCtx != tail && oldCtx != null; if (!oldCtx.name().equals(newName)) { if (context(newName) != null) { throw new IllegalArgumentException("Duplicate handler name: " + newName); } } AbstractChannelHandlerContext removed = handlers.set(idx, newCtx); assert removed != null; if (!inEventLoop) { try { executor.execute(() -> replace0(oldCtx, newCtx)); return oldCtx.handler(); } catch (Throwable cause) { handlers.set(idx, oldCtx); throw cause; } } } replace0(oldCtx, newCtx); return oldCtx.handler(); }
Source:
<code>private ArrayNode rawDiff() { if (rawDiff == null) { final DocumentMapping mapping = getMapping(); ObjectNode oldRevisionSource = mapper.valueToTree(oldRevision); ObjectNode newRevisionSource = mapper.valueToTree(newRevision); final JsonNode diff = JsonDiff.asJson(oldRevisionSource, newRevisionSource, DIFF_FLAGS); final ArrayNode rawDiff = ClassUtils.checkAndCast(diff, ArrayNode.class); final ArrayNode filteredRawDiff = mapper.createArrayNode(); final Iterator<JsonNode> elements = rawDiff.elements(); Set<String> fieldsToSkip = null; while (elements.hasNext()) { ObjectNode change = ClassUtils.checkAndCast(elements.next(), ObjectNode.class); final String property = getChangeRootProperty(change); if (fieldsToSkip != null && fieldsToSkip.contains(property)) { continue; } if (mapping.getRevisionFields().contains(property) && mapping.isCollection(property)) { change = new RevisionPropertyDiff(property, serializeToCommitDetailValue(oldRevisionSource, property), serializeToCommitDetailValue(newRevisionSource, property)) .asPatch(mapper, oldRevisionSource, true ); if (fieldsToSkip == null) { fieldsToSkip = Sets.newHashSetWithExpectedSize(1); } fieldsToSkip.add(property); } <START> if (!Revision.Fields.CREATED.equals(property) && !Revision.Fields.REVISED.equals(property)) { <END> filteredRawDiff.add(change); } } this.rawDiff = filteredRawDiff; } return this.rawDiff; }</code><technical_language>properties added fieldsToSkip initialization time. Revision.Fields.REVISED needlessly undergo collection-like conversion</technical_language>

Target:
private ArrayNode rawDiff() { if (rawDiff == null) { final DocumentMapping mapping = getMapping(); ObjectNode oldRevisionSource = mapper.valueToTree(oldRevision); ObjectNode newRevisionSource = mapper.valueToTree(newRevision); final JsonNode diff = JsonDiff.asJson(oldRevisionSource, newRevisionSource, DIFF_FLAGS); final ArrayNode rawDiff = ClassUtils.checkAndCast(diff, ArrayNode.class); final ArrayNode filteredRawDiff = mapper.createArrayNode(); final Iterator<JsonNode> elements = rawDiff.elements(); Set<String> fieldsToSkip = null; while (elements.hasNext()) { ObjectNode change = ClassUtils.checkAndCast(elements.next(), ObjectNode.class); final String property = getChangeRootProperty(change); if (Revision.isRevisionField(property) || (fieldsToSkip != null && fieldsToSkip.contains(property))) { continue; } if (mapping.getRevisionFields().contains(property) && mapping.isCollection(property)) { change = new RevisionPropertyDiff(property, serializeToCommitDetailValue(oldRevisionSource, property), serializeToCommitDetailValue(newRevisionSource, property)) .asPatch(mapper, oldRevisionSource, true ); if (fieldsToSkip == null) { fieldsToSkip = Sets.newHashSetWithExpectedSize(1); } fieldsToSkip.add(property); } filteredRawDiff.add(change); } this.rawDiff = filteredRawDiff; } return this.rawDiff; }
Source:
<code>private void addArgumentsAsVariables() { Object[] args = mi.getArguments(); if (args.length == 0) { return; } Object targetObject = mi.getThis(); Class<?> targetClass = AopProxyUtils.ultimateTargetClass(targetObject); if (targetClass == null) { targetClass = targetObject.getClass(); } Method method = AopUtils.getMostSpecificMethod(mi.getMethod(), targetClass); String[] paramNames = parameterNameDiscoverer.getParameterNames(method); if (paramNames == null) { logger.warn("Unable to resolve method parameter names for method: " + method + ". Debug symbol information is required if you are using parameter names in expressions."); return; } for (int i = 0; i < args.length; i++) { if (paramNames[i] != null) { <START> super.setVariable(paramNames[i], args[i]); <END> } } }</code><technical_language>For test work, need remove super</technical_language>

Target:
private void addArgumentsAsVariables() { Object[] args = mi.getArguments(); if (args.length == 0) { return; } Object targetObject = mi.getThis(); Class<?> targetClass = AopProxyUtils.ultimateTargetClass(targetObject); if (targetClass == null) { targetClass = targetObject.getClass(); } Method method = AopUtils.getMostSpecificMethod(mi.getMethod(), targetClass); String[] paramNames = parameterNameDiscoverer.getParameterNames(method); if (paramNames == null) { logger.warn("Unable to resolve method parameter names for method: " + method + ". Debug symbol information is required if you are using parameter names in expressions."); return; } for (int i = 0; i < args.length; i++) { if (paramNames[i] != null) { setVariable(paramNames[i], args[i]); } } }
Source:
<code>public Gateway3DSAuthorisationResponse authorise3dsResponse(Auth3dsResponseGatewayRequest request) { try { GatewayOrder gatewayOrder = build3dsResponseAuthOrder(request); GatewayClient.Response response = authoriseClient.postRequestFor(null, request.getGatewayAccount(), gatewayOrder, <START> ImmutableList.of(new HttpCookie(WORLDPAY_MACHINE_COOKIE_NAME, gatewayOrder.getProviderSessionId().get()))); <END> GatewayResponse<BaseAuthoriseResponse> gatewayResponse = getWorldpayGatewayResponse(response); if (!gatewayResponse.getBaseResponse().isPresent()) gatewayResponse.throwGatewayError(); BaseAuthoriseResponse authoriseResponse = gatewayResponse.getBaseResponse().get(); return Gateway3DSAuthorisationResponse.of(gatewayResponse.toString(), authoriseResponse.authoriseStatus(), authoriseResponse.getTransactionId()); } catch (GatewayErrorException e) { return Gateway3DSAuthorisationResponse.of(e.getMessage(), BaseAuthoriseResponse.AuthoriseStatus.EXCEPTION); } }</code><technical_language>Hmm, this is blow if a provider session ID for some reason. In practice, be, I I prefer absence of a meant cookie all. This result in authorisation failing handled existing code authorisation errors, is graceful cleans up</technical_language>

Target:
public Gateway3DSAuthorisationResponse authorise3dsResponse(Auth3dsResponseGatewayRequest request) { try { List<HttpCookie> cookies = request.getProviderSessionId() .map(providerSessionId -> singletonList(new HttpCookie(WORLDPAY_MACHINE_COOKIE_NAME, providerSessionId))) .orElse(emptyList()); GatewayClient.Response response = authoriseClient.postRequestFor( null, request.getGatewayAccount(), build3dsResponseAuthOrder(request), cookies); GatewayResponse<BaseAuthoriseResponse> gatewayResponse = getWorldpayGatewayResponse(response); if (!gatewayResponse.getBaseResponse().isPresent()) gatewayResponse.throwGatewayError(); BaseAuthoriseResponse authoriseResponse = gatewayResponse.getBaseResponse().get(); return Gateway3DSAuthorisationResponse.of(gatewayResponse.toString(), authoriseResponse.authoriseStatus(), authoriseResponse.getTransactionId()); } catch (GatewayErrorException e) { return Gateway3DSAuthorisationResponse.of(e.getMessage(), BaseAuthoriseResponse.AuthoriseStatus.EXCEPTION); } }
Source:
<code>public void runTests(TestPage pageToTest) throws TestExecutionException { processingQueue.addLast(pageToTest); String html = pageToTest.getHtml(); try { if (html.isEmpty()) client.send(EMPTY_PAGE_CONTENT); else client.send(html); } catch (InterruptedException e) { exceptionOccurred(e); <START> throw new TestExecutionException("Testing has been interrupted", e); <END> } catch (IOException e) { exceptionOccurred(e); throw new TestExecutionException("Communication error during testing", e); } }</code><technical_language>Thread.currentThread.interrupt()</technical_language>

Target:
public void runTests(TestPage pageToTest) throws TestExecutionException { processingQueue.addLast(pageToTest); String html = pageToTest.getHtml(); try { if (html.isEmpty()) client.send(EMPTY_PAGE_CONTENT); else client.send(html); } catch (InterruptedException e) { Thread.currentThread().interrupt(); exceptionOccurred(e); throw new TestExecutionException("Testing has been interrupted", e); } catch (IOException e) { exceptionOccurred(e); throw new TestExecutionException("Communication error during testing", e); } }
Source:
<code>static Map<String, Properties> getIntermediateStreamProperties(Config config) { Map<String, Properties> intermedidateStreamProperties = Collections.emptyMap(); ApplicationConfig appConfig = new ApplicationConfig(config); if (appConfig.getAppMode() == ApplicationConfig.ApplicationMode.BATCH) { StreamConfig streamConfig = new StreamConfig(config); intermedidateStreamProperties = JavaConverters.asJavaCollectionConverter(streamConfig.getStreamIds()) .asJavaCollection() .stream() .filter(streamConfig::getIsIntermediateStream) .collect(Collectors.toMap(Function.identity(), streamId -> { Properties properties = new Properties(); properties.putAll(streamConfig.getStreamProperties(streamId)); <START> properties.putIfAbsent("retention.ms", String.valueOf(KafkaConfig.DEFAULT_RETENTION_MS_FOR_BATCH())); <END> return properties; })); } return intermedidateStreamProperties; }</code><technical_language>switch hard-coded string: retention.ms TopicConfig.RETENTION_MS_CONFIG here</technical_language>

Target:
static Map<String, Properties> getIntermediateStreamProperties(Config config) { Map<String, Properties> intermedidateStreamProperties = Collections.emptyMap(); ApplicationConfig appConfig = new ApplicationConfig(config); if (appConfig.getAppMode() == ApplicationConfig.ApplicationMode.BATCH) { StreamConfig streamConfig = new StreamConfig(config); intermedidateStreamProperties = JavaConverters.asJavaCollectionConverter(streamConfig.getStreamIds()) .asJavaCollection() .stream() .filter(streamConfig::getIsIntermediateStream) .collect(Collectors.toMap(Function.identity(), streamId -> { Properties properties = new Properties(); properties.putAll(streamConfig.getStreamProperties(streamId)); properties.putIfAbsent(TopicConfig.RETENTION_MS_CONFIG, String.valueOf(KafkaConfig.DEFAULT_RETENTION_MS_FOR_BATCH())); return properties; })); } return intermedidateStreamProperties; }
Source:
<code>public void testCallsiteCopy2() { try { new TmfCallsite(null); fail("null copy"); <START> } catch (final IllegalArgumentException e) { <END> } }</code><technical_language>In wonderful world of JUnit4 ;) @Test(expected=IllegalArgumentException.class) public void testCallsiteCopy2() { new TmfCallsite(null); }</technical_language>

Target:
public void testCallsiteCopy2() { new TmfCallsite(null); }
Source:
<code>public void execute(ImmutableMultimap<String, String> parameters, PrintWriter output) { <START> worker.execute(); <END> }</code><technical_language>id start</technical_language>

Target:
public void execute(ImmutableMultimap<String, String> parameters, PrintWriter output) { String queryParam = "startId"; Long startId = 1L; if (parameters.containsKey(queryParam)) { startId = Long.valueOf(parameters.get(queryParam).asList().get(0)); } worker.execute(startId); }
Source:
<code>public void init() throws APIManagerIntegrationTestException, APIManagementException, IOException { setupUserData(); apiStore = new APIStoreRestClient(storeURL); apiStore.login(SUPER_USER, SUPER_USER_LOGIN_PW); apiPublisher = new APIPublisherRestClient(publisherURL); apiPublisher.login(SUPER_USER, SUPER_USER_LOGIN_PW); apiPublisherAdmin = new APIPublisherRestClient(publisherURL); apiPublisherAdmin.login(ADMIN_LOGIN_USERNAME, ADMIN_LOGIN_PW); <START> String swaggerFilePath = System.getProperty("user.dir") + File.separator + "src" + File.separator + "test" + <END> File.separator + "resources" + File.separator + "swaggerFiles" + File.separator + "APIScopeTest1.json"; File swaggerFile = new File(swaggerFilePath); String swaggerContent = readFromFile(swaggerFile.getAbsolutePath()); JSONObject swaggerJson = new JSONObject(swaggerContent); try { apiPublisher.developSampleAPI(swaggerJson, SUPER_USER, backendEndPoint, true, apiVisibility); } catch (Exception ex) { log.error("API publication failed", ex); } }</code><technical_language>resourceLocation + "swaggerFiles" + File.separator + "APIScopeTest1.json"</technical_language>

Target:
public void init() throws Exception { setupUserData(); apiStore = new APIStoreRestClient(storeURL); apiStore.login(SUPER_USER, SUPER_USER_LOGIN_PW); apiPublisher = new APIPublisherRestClient(publisherURL); apiPublisher.login(SUPER_USER, SUPER_USER_LOGIN_PW); apiPublisherAdmin = new APIPublisherRestClient(publisherURL); apiPublisherAdmin.login(ADMIN_LOGIN_USERNAME, ADMIN_LOGIN_PW); String swaggerFilePath = resourceLocation + "swaggerFiles" + File.separator + "APIScopeTest1.json"; File swaggerFile = new File(swaggerFilePath); String swaggerContent = readFromFile(swaggerFile.getAbsolutePath()); JSONObject swaggerJson = new JSONObject(swaggerContent); try { apiPublisher.developSampleAPI(swaggerJson, SUPER_USER, backendEndPoint, true, apiVisibility); } catch (Exception ex) { log.error("API publication failed", ex); } }
Source:
<code>public void onCreate(Bundle savedInstanceState) { String currentTheme = ThemeHelper.getSelectedTheme(this); <START> if(currentTheme.equals("light_theme")) { <END> this.setTheme(R.style.FilePickerThemeLight); } else { this.setTheme(R.style.FilePickerThemeDark); } super.onCreate(savedInstanceState); }</code><technical_language>ThemeHelper#isLightThemeSelected instead of hard coding it</technical_language>

Target:
public void onCreate(Bundle savedInstanceState) { if(ThemeHelper.isLightThemeSelected(this)) { this.setTheme(R.style.FilePickerThemeLight); } else { this.setTheme(R.style.FilePickerThemeDark); } super.onCreate(savedInstanceState); }
Source:
<code>public FbStatus(final int code) { this(new Condition<Integer>() { @Override public boolean fits(final Integer status) { <START> return code == status; <END> } }); }</code><technical_language>@komaz autoboxing here, visible? .intValue() equals()</technical_language>

Target:
public FbStatus(final int code) { this(new Condition<Integer>() { @Override public boolean fits(final Integer status) { return code == status.intValue(); } }); }
Source:
<code>public void testAddAccount() throws Exception { <START> accountDao.addAccount(testAccount); <END> }</code><technical_language>get account verify</technical_language>

Target:
public void testAddAccount() throws Exception { accountDao.addAccount(testAccount); verify(mockConnection).prepareStatement(anyString()); accountDao.addAccount(testAccount); verify(mockConnection).prepareStatement(anyString()); }
Source:
<code>public void reloadComponents() { componentTables.clear(); for (ComponentTableProvider provider : extensionStorage.getComponentTableProviders()) { ComponentTable<?> table = provider.provide(sceneMC); componentTables.add(table); table.setProperties(this); <START> } <END> componentSelectDialog.getComponentClasses().clear(); for (UserAddableComponentProvider provider : extensionStorage.getUserAddableComponentProviders()) { componentSelectDialog.getComponentClasses().add(provider.provide()); } this.rebuildPropertiesTable(); }</code><technical_language>This is code in constructor, constructor call this method avoid code duplication</technical_language>

Target:
public void reloadComponents() { reloadComponentTables(); componentSelectDialog.reloadComponents(); rebuildPropertiesTable(); }
Source:
<code>public void checkAttributeSemantics(PerunSessionImpl sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException, InternalErrorException, WrongReferenceAttributeValueException { try { if (attribute.valueAsString().equals("true")) { <START> Attribute requiredAttribute = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUPMEMBERSQUERY_ATTRNAME); <END> if (requiredAttribute.getValue() == null) { throw new WrongReferenceAttributeValueException(attribute, requiredAttribute, group, null, group, null, requiredAttribute.toString() + " must be set in order to enable synchronization."); } requiredAttribute = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUPEXTSOURCE_ATTRNAME); if (requiredAttribute.getValue() == null) { throw new WrongReferenceAttributeValueException(attribute, requiredAttribute, group, null, group, null, requiredAttribute.toString() + " must be set in order to enable synchronization."); } } } catch (AttributeNotExistsException e) { throw new ConsistencyErrorException(e); } }</code><technical_language>If null, this throw NullPointerException here</technical_language>

Target:
public void checkAttributeSemantics(PerunSessionImpl sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException, InternalErrorException, WrongReferenceAttributeValueException { if (attribute.getValue() == null) return; try { if (attribute.valueAsString().equals("true")) { Attribute requiredAttribute = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUPMEMBERSQUERY_ATTRNAME); if (requiredAttribute.getValue() == null) { throw new WrongReferenceAttributeValueException(attribute, requiredAttribute, group, null, group, null, requiredAttribute.toString() + " must be set in order to enable synchronization."); } requiredAttribute = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUPEXTSOURCE_ATTRNAME); if (requiredAttribute.getValue() == null) { throw new WrongReferenceAttributeValueException(attribute, requiredAttribute, group, null, group, null, requiredAttribute.toString() + " must be set in order to enable synchronization."); } } } catch (AttributeNotExistsException e) { throw new ConsistencyErrorException(e); } }
Source:
<code>protected void doPostProcessingForSuccesfulSend() throws InvalidParametersException, EntityDoesNotExistException { FeedbackSessionAttributes feedbackObject = FeedbackSessionsLogic.inst() .getFeedbackSession(feedbackSessionName, courseId); <START> feedbackObject.setPublishedEmailEnabled(false); <END> FeedbackSessionsLogic.inst().updateFeedbackSession(feedbackObject); }</code><technical_language>give this PR a closer later, this a odd. this setSentPublishedEmail instead of setPublishedEmailEnabled</technical_language>

Target:
protected void doPostProcessingForSuccesfulSend() throws InvalidParametersException, EntityDoesNotExistException { FeedbackSessionAttributes feedbackSession = FeedbackSessionsLogic.inst() .getFeedbackSession(feedbackSessionName, courseId); feedbackSession.setSentPublishedEmail(false); FeedbackSessionsLogic.inst().updateFeedbackSession(feedbackSession); }
Source:
<code>private boolean internalValidateAndSetQuota() { if (isInternalExecution()) { return true; } if (getStoragePool() == null) { throw new InvalidQuotaParametersException("Command: " + this.getClass().getName() + ". Storage pool is not available for quota calculation. "); } QuotaConsumptionParametersWrapper quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper(this, getReturnValue().getCanDoActionMessages()); quotaConsumptionParametersWrapper.setParameters(getQuotaConsumptionParameters()); if (quotaConsumptionParametersWrapper.getParameters() == null) { throw new InvalidQuotaParametersException("Command: " + this.getClass().getName() + ". No Quota parameters available."); } <START> boolean result = true; END> setQuotaWasChanged(result); return result; }</code><technical_language>Hmm, I this is misleading :) I a feeling this is case, more clear this, else ask in 6 reviews now:)</technical_language>

Target:
private boolean internalValidateAndSetQuota() { if (isInternalExecution()) { return true; } if (getStoragePool() == null) { throw new InvalidQuotaParametersException("Command: " + this.getClass().getName() + ". Storage pool is not available for quota calculation. "); } QuotaConsumptionParametersWrapper quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper(this, getReturnValue().getCanDoActionMessages()); quotaConsumptionParametersWrapper.setParameters(getQuotaConsumptionParameters()); if (quotaConsumptionParametersWrapper.getParameters() == null) { throw new InvalidQuotaParametersException("Command: " + this.getClass().getName() + ". No Quota parameters available."); } boolean result = true; setQuotaChanged(result); return result; }
Source:
<code>public void ensurePath(String path, boolean excludingLast) throws KeeperException { <START> reporter.time(tag, "ensurePath", (ZooKeeperCallable<Void>) () -> { <END> client.ensurePath(path, excludingLast); return null; }); }</code><technical_language>I casts (ZooKeeperCallable<Void>) necessary; in some spots in diff others</technical_language>

Target:
public void ensurePath(String path, boolean excludingLast) throws KeeperException { reporter.time(tag, "ensurePath", () -> { client.ensurePath(path, excludingLast); return null; }); }
Source:
<code>protected void executeCommand() { StoragePoolIsoMap map = loadStoragePoolIsoMap(); changeDomainStatusWithCompensation(map, StorageDomainStatus.Unknown, StorageDomainStatus.Locked, getCompensationContext()); if (shouldPerformOvfUpdate()) { ActionReturnValue returnValue = runInternalAction(ActionType.UpdateOvfStoreForStorageDomain, createUpdateOvfStoreParams(), <START> getContext().clone().withoutCompensationContext()); <END> if (!returnValue.getSucceeded()) { return; } } if (noAsyncOperations()) { executeDeactivateCommand(); } setSucceeded(true); }</code><technical_language>cloneContext()</technical_language>

Target:
protected void executeCommand() { StoragePoolIsoMap map = loadStoragePoolIsoMap(); changeDomainStatusWithCompensation(map, StorageDomainStatus.Unknown, StorageDomainStatus.Locked, getCompensationContext()); if (shouldPerformOvfUpdate()) { ActionReturnValue returnValue = runInternalAction(ActionType.UpdateOvfStoreForStorageDomain, createUpdateOvfStoreParams(), cloneContext().withoutCompensationContext()); if (!returnValue.getSucceeded()) { return; } } if (noAsyncOperations()) { executeDeactivateCommand(); } setSucceeded(true); }
Source:
<code>public boolean isProjectComplete(Project project) { boolean projectsXmlExists = (new File(ConfigCore.getKitodoConfigDirectory() + "kitodo_projects.xml")).exists(); boolean digitalCollectionsXmlExists = (new File( <START> ConfigCore.getKitodoConfigDirectory() + "kitodo_digitalCollections.xml")).exists(); <END> return project.getTitle() != null && project.template != null && project.getFileFormatDmsExport() != null && project.getFileFormatInternal() != null && digitalCollectionsXmlExists && projectsXmlExists; }</code><technical_language>For kitodo_digitalCollections.xml is in Kitodo/src/main/java/org/goobi/production/constants/FileNames.java a constant defined. considered this add other for kitodo_projects.xml. instead of hard coding everywhere</technical_language>

Target:
public boolean isProjectComplete(Project project) { boolean projectsXmlExists = (new File(ConfigCore.getKitodoConfigDirectory() + FileNames.PROJECT_CONFIGURATION_FILE)).exists(); boolean digitalCollectionsXmlExists = (new File( ConfigCore.getKitodoConfigDirectory() + FileNames.DIGITAL_COLLECTIONS_FILE)).exists(); return project.getTitle() != null && project.template != null && project.getFileFormatDmsExport() != null && project.getFileFormatInternal() != null && digitalCollectionsXmlExists && projectsXmlExists; }
Source:
<code>public String changeSessionId() { String oldId = delegate.getId(); String id = delegate.changeSessionId(); Map<String, Object> oldState = map.readAllMap(); map.delete(); map = redisson.getMap(keyPrefix + id, map.getCodec()); map.putAll(oldState); RBatch batch = redisson.createBatch(BatchOptions.defaults()); batch.getBucket(getExpiredKey(oldId)).remainTimeToLiveAsync(); batch.getBucket(getExpiredKey(oldId)).deleteAsync(); <START> <END> BatchResult<?> res = batch.execute(); List<?> list = res.getResponses(); Long remainTTL = (Long) list.get(0); redisson.getBucket(getExpiredKey(id)).set("", remainTTL, TimeUnit.MILLISECONDS); return id; }</code><technical_language>fine</technical_language>

Target:
public String changeSessionId() { String oldId = delegate.getId(); String id = delegate.changeSessionId(); RBatch batch = redisson.createBatch(BatchOptions.defaults()); batch.getBucket(getExpiredKey(oldId)).remainTimeToLiveAsync(); batch.getBucket(getExpiredKey(oldId)).deleteAsync(); batch.getMap(map.getName()).readAllMapAsync(); batch.getMap(map.getName()).deleteAsync(); BatchResult<?> res = batch.execute(); List<?> list = res.getResponses(); Long remainTTL = (Long) list.get(0); Map<String, Object> oldState = (Map<String, Object>) list.get(2); RBatch batchNew = redisson.createBatch(BatchOptions.defaults()); batchNew.getMap(keyPrefix + id, map.getCodec()).putAllAsync(oldState); batchNew.getBucket(getExpiredKey(id)).setAsync("", remainTTL, TimeUnit.MILLISECONDS); batchNew.execute(); return id; }
Source:
<code>public void teardownTest() throws Exception { List<CompletableFuture<Void>> futures = members.stream().map(Atomix::stop).collect(Collectors.toList()); try { CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()])).get(30, TimeUnit.SECONDS); } catch (Exception e) { } <START> protocol.close(); <END> }</code><technical_language>finally</technical_language>

Target:
public void teardownTest() throws Exception { List<CompletableFuture<Void>> futures = members.stream().map(Atomix::stop).collect(Collectors.toList()); try { CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()])).get(30, TimeUnit.SECONDS); } catch (Exception e) { } finally { protocol.close(); } }
Source:
<code>public void addGroup(Group group) throws CacheDatabaseException { String selectQuery = "SELECT * FROM " + TABLE_GROUPS + " WHERE " + KEY_GROUP_NODEID + " = ?"; Cursor cursor = mDatabase.rawQuery(selectQuery, new String[]{group.getId().getId()}); if (cursor.getCount() == 1) { cursor.close(); updateGroup(group); } else if (cursor.getCount() > 1) { deleteGroup(group); } <START> if (cursor.getCount() > 1 || cursor.getCount() == 0) { <END> try { ContentValues values = createContentValuesForGroup(group); mDatabase.insert(TABLE_GROUPS, null, values); for (User user : group.getUsers()) { addUser(user); } for (Message message : group.getLastMessages().values()) { addMessage(message, group.getId()); } cursor.close(); } catch (CacheDatabaseException | IOException exception) { Log.d(TAG, "Unable to add Group with id: " + group.getId().getId(), exception); throw new CacheDatabaseException(exception); } } }</code><technical_language>there, is a of writing conditions in this function... (And simplify condition.)</technical_language>

Target:
public void addGroup(Group group) throws CacheDatabaseException { Objects.requireNonNull(group); String selectQuery = "SELECT * FROM " + TABLE_GROUPS + " WHERE " + KEY_GROUP_NODEID + " = ?"; Cursor cursor = mDatabase.rawQuery(selectQuery, new String[]{group.getId().getId()}); if (cursor.getCount() >= 1) { cursor.close(); updateGroup(group); } else if (cursor.getCount() > 1) { deleteGroup(group); } if (cursor.getCount() > 1 || cursor.getCount() == 0) { try { ContentValues values = createContentValuesForGroup(group); mDatabase.insert(TABLE_GROUPS, null, values); for (User user : group.getUsers()) { addUser(user); } for (Message message : group.getLastMessages().values()) { addMessage(message, group.getId()); } cursor.close(); } catch (CacheDatabaseException | IOException exception) { Log.d(TAG, "Unable to add Group with id: " + group.getId().getId(), exception); throw new CacheDatabaseException(exception); } } }