auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void deleteUniqueAllergy() throws Exception { Allergy allergy = Context.getPatientService().getAllergy(AALLERGY_ID); Assert.assertFalse(allergy.isVoided()); <START> handle(newDeleteRequest(getURI() + "/" + RestTestConstants2_0.ALLERGY_ID, <END> new Parameter("reason", "unit test"))); allergy = Context.getPatientService().getAllergy(AALLERGY_ID); Assert.assertTrue(allergy.isVoided()); Assert.assertEquals("unit test", allergy.getVoidReason()); }</code><technical_language>this needs work UUID</technical_language>

Target:
public void deleteUniqueAllergy() throws Exception { Allergy allergy = Context.getPatientService().getAllergyByUuid(getUuid()); Assert.assertFalse(allergy.isVoided()); handle(newDeleteRequest(getURI() + "/" + getUuid(), new Parameter("reason", "unit test"))); allergy = Context.getPatientService().getAllergyByUuid(getUuid()); Assert.assertTrue(allergy.isVoided()); Assert.assertEquals("unit test", allergy.getVoidReason()); }
Source:
<code>@Override public Void visitDynamicParam(RexDynamicParam dynamicParam) { <START> containsDynamicParam |= true; <END> return super.visitDynamicParam(dynamicParam); }</code><technical_language>Is this intentional? forcing 'true' a simple assignment is clearer</technical_language>

Target:
@Override public Void visitDynamicParam(RexDynamicParam dynamicParam) { containsDynamicParam = true; return super.visitDynamicParam(dynamicParam); }
Source:
<code>public Future<ReadableStreamChannel> getBlob(String blobId, Callback<ReadableStreamChannel> callback) { currentOperationsCount.incrementAndGet(); routerMetrics.getBlobOperationRate.mark(); routerMetrics.operationQueuingRate.mark(); FutureResult<ReadableStreamChannel> futureResult = new FutureResult<ReadableStreamChannel>(); if (isOpen.get()) { getOperationController().getBlob(blobId, futureResult, callback); } else { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); <START> routerMetrics.operationAbortCount.inc(); <END> routerMetrics.getBlobErrorCount.inc(); routerMetrics.countError(routerException); operationCompleteCallback.completeOperation(futureResult, callback, null, routerException); } return futureResult; }</code><technical_language>again, this is incorrect</technical_language>

Target:
public Future<ReadableStreamChannel> getBlob(String blobId, Callback<ReadableStreamChannel> callback) { currentOperationsCount.incrementAndGet(); routerMetrics.getBlobOperationRate.mark(); routerMetrics.operationQueuingRate.mark(); FutureResult<ReadableStreamChannel> futureResult = new FutureResult<ReadableStreamChannel>(); if (isOpen.get()) { getOperationController().getBlob(blobId, futureResult, callback); } else { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); routerMetrics.getBlobErrorCount.inc(); routerMetrics.countError(routerException); operationCompleteCallback.completeOperation(futureResult, callback, null, routerException); } return futureResult; }
Source:
<code>private void setGit() throws IllegalArgumentException, IOException { <START> try { <END> if (workDirTree == null) throw new IllegalArgumentException("workDirTree is null and can't be resolved"); git = Git.open(workDirTree); } catch (IOException e) { throw new IOException("failed while read from workDirTree", e); } }</code><technical_language>throws IAE workDirTree is null. more, less</technical_language>

Target:
private void setGit() throws IOException { try { if (workDirTree == null) throw new IllegalArgumentException("workDirTree is null and can't be resolved"); git = Git.open(workDirTree); } catch (IOException e) { throw new IOException( "failed while read from workDirTree with name " + workDirTree.getName(), e); } }
Source:
<code>private void appendAttributeString(StringBuilder sb, BlackboardAttribute.ATTRIBUTE_TYPE attribType, Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributesMap, String prependStr) { BlackboardAttribute attribute = attributesMap.get(attribType); if (attribute != null) { String attrVal = attribute.getDisplayString(); if (!StringUtils.isEmpty(attrVal)) { if (!StringUtils.isEmpty(prependStr)) { sb.append(prependStr).append(' '); } <START> sb.append(StringUtils.abbreviate(attrVal, 200)).append(' '); <END> } } }</code><technical_language>Magic number</technical_language>

Target:
private void appendAttributeString(StringBuilder sb, BlackboardAttribute.ATTRIBUTE_TYPE attribType, Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributesMap, String prependStr) { BlackboardAttribute attribute = attributesMap.get(attribType); if (attribute != null) { String attrVal = attribute.getDisplayString(); if (!StringUtils.isEmpty(attrVal)) { if (!StringUtils.isEmpty(prependStr)) { sb.append(prependStr).append(' '); } sb.append(StringUtils.abbreviate(attrVal, ATTRIBUTE_STR_MAX_LEN)).append(' '); } } }
Source:
<code><START> public boolean equals(Object obj) { <END> if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TtyDev other = (TtyDev) obj; if (!getOuterType().equals(other.getOuterType())) { return false; } if (this.portName == null) { if (other.portName != null) { return false; } } else if (!this.portName.equals(other.portName)) { return false; } return true; }</code><technical_language>This is a bit asymmetrical comparator. test for equality considers port name. This is a trick support removing TtyDev internal list name only. comparator, instead, considers interface numbers. However, Java doc states: > is generally case, strictly required (compare(x, y)==0) == (x.equals(y)). Generally speaking, comparator violates this condition this fact. recommended language is "Note: this comparator imposes orderings inconsistent equals."</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TtyDev other = (TtyDev) obj; if (this.portName == null) { if (other.portName != null) { return false; } } else if (!this.portName.equals(other.portName)) { return false; } return true; }
Source:
<code>public <T extends Vertex> void link( Class<T> type, Function<T, DataImportIssue> unlinkedIssueMapper ) { @SuppressWarnings("unchecked") List<T> vertices = graph.getVertices() .stream() .filter(type::isInstance) .map(it -> (T)it) .collect(Collectors.toList()); String actionName = "Link " + type.getSimpleName(); if(vertices.isEmpty()) { LOG.info("{} skiped. No such data exist.", actionName); return; } ProgressTracker progress = ProgressTracker.track(actionName, 500, vertices.size()); LOG.info(progress.startMessage()); for (T v : vertices) { boolean alreadyLinked = v.getOutgoing().stream().anyMatch(e -> e instanceof StreetTransitLink); if (alreadyLinked) { continue; } <START> if (v instanceof TransitStopVertex && !((TransitStopVertex) v).isStreetLinkable()) continue; <END> if (!link(v)) { issueStore.add(unlinkedIssueMapper.apply(v)); }; progress.step(m -> LOG.info(m)); } LOG.info(progress.completeMessage()); }</code><technical_language>{ } body of a if statement. is ok line</technical_language>

Target:
public <T extends Vertex> void link( Class<T> type, Function<T, DataImportIssue> unlinkedIssueMapper ) { @SuppressWarnings("unchecked") List<T> vertices = graph.getVertices() .stream() .filter(type::isInstance) .map(it -> (T)it) .collect(Collectors.toList()); String actionName = "Link " + type.getSimpleName(); if(vertices.isEmpty()) { LOG.info("{} skiped. No such data exist.", actionName); return; } ProgressTracker progress = ProgressTracker.track(actionName, 500, vertices.size()); LOG.info(progress.startMessage()); for (T v : vertices) { boolean alreadyLinked = v.getOutgoing().stream().anyMatch(e -> e instanceof StreetTransitLink); if (alreadyLinked) { continue; } if (v instanceof TransitStopVertex && ((TransitStopVertex) v).hasPathways()) { continue; }; if (!link(v)) { issueStore.add(unlinkedIssueMapper.apply(v)); }; progress.step(m -> LOG.info(m)); } LOG.info(progress.completeMessage()); }
Source:
<code>private Collection<Pattern> loadRegexPatterns(String patternFilename) { Collection<Pattern> patterns = new LinkedList<>(); try { Path patternFile = Paths.get(patternFilename); if (!Files.exists(patternFile)) { return patterns; } List<String> lines = <START> Files.readAllLines(patternFile, <END> StandardCharsets.UTF_8); for (String line : lines) { patterns.add(Pattern.compile(line, Pattern.DOTALL)); } } catch (FileNotFoundException e) { log.info("Patterns file not found, ignoring.", patternFilename); } catch (IOException e) { log.warn("Failed reading from patterns file"); } log.info("Loaded patterns from {}", patterns.size(), patternFilename); return patterns; }</code><technical_language>lines() nicer readAllLines()</technical_language>

Target:
private Collection<Pattern> loadRegexPatterns(String patternFilename) { Collection<Pattern> patterns = new LinkedList<>(); try { Path patternFile = Paths.get(patternFilename); if (!Files.exists(patternFile)) { return patterns; } Files.lines(patternFile, UTF_8) .forEach(line -> patterns.add(Pattern.compile(line, Pattern.DOTALL))); } catch (FileNotFoundException e) { log.info("Patterns file not found, ignoring.", patternFilename); } catch (IOException e) { log.warn("Failed reading from patterns file"); } log.info("Loaded patterns from {}", patterns.size(), patternFilename); return patterns; }
Source:
<code>protected void initStreamBufferSize() { Integer streamBufferSizeParam = getInitParameter("streamBufferSize", Integer.class); <START> setStreamBufferSize((streamBufferSizeParam == null) ? DEFAULT_STREAM_BUFFER_SIZE : streamBufferSizeParam); <END> if (isDebug()) { LOGGER.debug("streamBufferSize: {}", getStreamBufferSize()); } }</code><technical_language>If changing this code, relying Optional a good move</technical_language>

Target:
protected void initStreamBufferSize() { setStreamBufferSize(Optional.ofNullable(getInitParameter("streamBufferSize", Integer.class)).orElse(DEFAULT_STREAM_BUFFER_SIZE)); if (isDebug()) { LOGGER.debug("streamBufferSize: {}", getStreamBufferSize()); } }
Source:
<code>private void preRequestReadMoreItems(final LayoutInflater layoutInflater) { <START> if (parentFragment.getPage().getPageProperties().isMainPage()) { <END> new MainPageReadMoreTopicTask(activity) { @Override public void onFinish(PageTitle myTitle) { requestReadMoreItems(layoutInflater, myTitle); } @Override public void onCatch(Throwable caught) { Log.w(TAG, "Error while getting Read More topic for main page.", caught); layoutContent(); } }.execute(); } else { requestReadMoreItems(layoutInflater, pageTitle); } }</code><technical_language>Page.isMainPage()</technical_language>

Target:
private void preRequestReadMoreItems(final LayoutInflater layoutInflater) { if (parentFragment.getPage().isMainPage()) { new MainPageReadMoreTopicTask(activity) { @Override public void onFinish(PageTitle myTitle) { requestReadMoreItems(layoutInflater, myTitle); } @Override public void onCatch(Throwable caught) { Log.w(TAG, "Error while getting Read More topic for main page.", caught); layoutContent(); } }.execute(); } else { requestReadMoreItems(layoutInflater, pageTitle); } }
Source:
<code>private void sendToDevice(final ClientConnection conn, final DlmsDevice device, final ReplaceKeyCommandExecutor.KeyWrapper keyWrapper) throws ProtocolAdapterException { try { final byte[] decryptedKey = this.decrypt(keyWrapper.getBytes()); final MethodParameter methodParameterAuth = SecurityUtils.globalKeyTransfer(this.getMasterKey(device), decryptedKey, keyWrapper.getKeyId()); final MethodResultCode methodResultCode = conn.action(methodParameterAuth).get(0).resultCode(); if (!MethodResultCode.SUCCESS.equals(methodResultCode)) { throw new ProtocolAdapterException("AccessResultCode for replace keys was not SUCCESS: " + methodResultCode); } <START> } catch (final TechnicalException | IOException e) { <END> throw new ConnectionException(e); } }</code><technical_language>This suspicious. ConnectionException is thrown is a RetryableException, signals core code initial action retried change. For IOException this sense, is a good chance work simple retry, other changes. For a TechnicalException, case retrying sense, other actions. In a case exception rethrown a RetryableException. In this command executor TechnicalException thrown decryption failure, fail if is simply retried. I guess decrypt throw a ProtocolAdapterException here, requiring changes exception handling in sendToDevice</technical_language>

Target:
private void sendToDevice(final ClientConnection conn, final DlmsDevice device, final ReplaceKeyCommandExecutor.KeyWrapper keyWrapper) throws ProtocolAdapterException { try { final byte[] decryptedKey = RsaEncrypterService.decrypt(keyWrapper.getBytes(), this.privateKeyPath); final byte[] decryptedMasterKey = RsaEncrypterService.decrypt(this.getMasterKey(device), this.privateKeyPath); final MethodParameter methodParameterAuth = SecurityUtils.globalKeyTransfer(decryptedMasterKey, decryptedKey, keyWrapper.getKeyId()); final MethodResultCode methodResultCode = conn.action(methodParameterAuth).get(0).resultCode(); if (!MethodResultCode.SUCCESS.equals(methodResultCode)) { throw new ProtocolAdapterException("AccessResultCode for replace keys was not SUCCESS: " + methodResultCode); } } catch (final IOException e) { throw new ConnectionException(e); } catch (final RsaEncrypterException e) { LOGGER.error("Unexpected exception during decryption of security keys", e); throw new ProtocolAdapterException("Unexpected exception during decryption of security keys, reason = " + e.getMessage()); } }
Source:
<code><START> public boolean add(BufferConsumer bufferConsumer, boolean isPriorityEvent) { <END> if (isPriorityEvent) { if (readView != null && readView.notifyPriorityEvent(bufferConsumer)) { bufferConsumer.close(); return true; } return add(bufferConsumer, false, true); } return add(bufferConsumer, false, false); }</code><technical_language>isPriorityEvent == true tested in way. While a test for checking enqueued head data notification issued</technical_language>

Target:
public boolean add(BufferConsumer bufferConsumer, boolean isPriorityEvent) throws IOException { if (isPriorityEvent) { if (readView != null && readView.notifyPriorityEvent(bufferConsumer)) { bufferConsumer.close(); return true; } return add(bufferConsumer, false, true); } return add(bufferConsumer, false, false); }
Source:
<code>public boolean pollSocketsInfo() { if (!isTcpInfoSupported()) return false; FileDescriptor fd = null; try { final long time = SystemClock.elapsedRealtime(); fd = connectToKernel(); mTcpStats.clear(); for (final int family : ADDRESS_FAMILIES) { if (!sendPollingRequest(fd, family)) continue; final ByteBuffer bytes = recvMesssage(fd); log("pollSocketsInfo: recv size=" + bytes.limit()); while (enoughBytesRemainForValidNlMsg(bytes)) { final StructNlMsgHdr nlmsghdr = StructNlMsgHdr.parse(bytes); final int nlmsgLen = nlmsghdr.nlmsg_len; log("pollSocketsInfo: nlmsgLen=" + nlmsgLen); if (isValidInetDiagMsgSize(nlmsgLen)) { bytes.position(bytes.position() + StructInetDiagMsg.STRUCT_SIZE <START> - 7 * Integer.BYTES); <END> final long cookie = bytes.getLong(); bytes.position(bytes.position() + 5 * Integer.BYTES); final SocketInfo info = parseSockInfo(bytes, family, nlmsgLen, time); mTcpStats.put(cookie, makeTcpStat(info, mSocketInfos.get(cookie))); mSocketInfos.put(cookie, info); } if (nlmsghdr.nlmsg_type == NLMSG_DONE) break; } } cleanupSocketInfo(time); return true; } catch (ErrnoException | SocketException | InterruptedIOException e) { Log.e(TAG, "Fail to get TCP info via netlink.", e); } finally { NetworkStackUtils.closeSocketQuietly(fd); } return false; }</code><technical_language>Ah yes, I miss Integer. Still, is defined end ? uncommon do in C ; define start add attributes end code written (including compiled) works</technical_language>

Target:
public boolean pollSocketsInfo() { if (!mDependencies.isTcpInfoParsingSupported()) return false; FileDescriptor fd = null; try { final long time = SystemClock.elapsedRealtime(); fd = mDependencies.connectToKernel(); mTcpStats.clear(); for (final int family : ADDRESS_FAMILIES) { mDependencies.sendPollingRequest(fd, mSockDiagMsg.get(family)); final ByteBuffer bytes = mDependencies.recvMesssage(fd); while (enoughBytesRemainForValidNlMsg(bytes)) { final StructNlMsgHdr nlmsghdr = StructNlMsgHdr.parse(bytes); final int nlmsgLen = nlmsghdr.nlmsg_len; log("pollSocketsInfo: nlmsgLen=" + nlmsgLen); if (isValidInetDiagMsgSize(nlmsgLen)) { bytes.position(bytes.position() + StructInetDiagMsg.STRUCT_SIZE - 7 * Integer.BYTES); final long cookie = bytes.getLong(); bytes.position(bytes.position() + 5 * Integer.BYTES); final SocketInfo info = parseSockInfo(bytes, family, nlmsgLen, time); mTcpStats.put(cookie, makeTcpStat(info, mSocketInfos.get(cookie))); mSocketInfos.put(cookie, info); } if (nlmsghdr.nlmsg_type == NLMSG_DONE) break; } } cleanupSocketInfo(time); return true; } catch (ErrnoException | SocketException | InterruptedIOException e) { Log.e(TAG, "Fail to get TCP info via netlink.", e); } finally { NetworkStackUtils.closeSocketQuietly(fd); } return false; }
Source:
<code>private void reportIssues() { MethodInvariantContext methodInvariantContext = methodInvariantContexts.pop(); if (!methodInvariantContext.methodToCheck) { return; } if (methodInvariantContext.returnImmutableType && methodInvariantContext.symbolicValues.size() == 1 && methodInvariantContext.endPaths > 1) { report(methodInvariantContext); } if(!methodInvariantContext.avoidRaisingConstraintIssue) { <START> for (Class<? extends Constraint> aClass : methodInvariantContext.methodConstraints.keys()) { <END> Collection<Constraint> constraints = methodInvariantContext.methodConstraints.get(aClass); if(constraints.size() == methodInvariantContext.endPaths && constraints.stream().allMatch(c -> constraints.iterator().next().hasPreciseValue() && constraints.iterator().next().equals(c))) { report(methodInvariantContext); return; } } } }</code><technical_language>Poor naming of aClass. constraintClass</technical_language>

Target:
private void reportIssues() { MethodInvariantContext methodInvariantContext = methodInvariantContexts.pop(); if (!methodInvariantContext.methodToCheck) { return; } if (methodInvariantContext.returnImmutableType && methodInvariantContext.symbolicValues.size() == 1 && methodInvariantContext.endPaths > 1) { report(methodInvariantContext); } else if (!methodInvariantContext.avoidRaisingConstraintIssue) { for (Class<? extends Constraint> constraintClass : methodInvariantContext.methodConstraints.keys()) { Collection<Constraint> constraints = methodInvariantContext.methodConstraints.get(constraintClass); Constraint firstConstraint = constraints.iterator().next(); if (constraints.size() == methodInvariantContext.endPaths && firstConstraint.hasPreciseValue() && constraints.stream().allMatch(firstConstraint::equals)) { report(methodInvariantContext); return; } } } }
Source:
<code>private List<DataCenterVnetVO> findOverlappingVnets(final long dcId, final Long physicalNetworkId, final String vnet) { final List<Integer> searchVnets = UriUtils.expandVlanUri(vnet); final List<DataCenterVnetVO> overlappingVnets = new ArrayList<>(); <START> if (searchVnets != null && searchVnets.size() > 0) { <END> SearchCriteria<DataCenterVnetVO> sc = VnetDcSearch.create(); sc.setParameters("dc", dcId); if (physicalNetworkId != null) { sc.setParameters("physicalNetworkId", physicalNetworkId); } for (final DataCenterVnetVO dcVNet : listBy(sc)) { if (dcVNet == null || dcVNet.getVnet() == null) { continue; } final Integer vnetValue = NumbersUtil.parseInt(dcVNet.getVnet(), -1); if (vnetValue != -1 && searchVnets.contains(vnetValue)) { overlappingVnets.add(dcVNet); } } } return overlappingVnets; }</code><technical_language>inverting this conditional? if( searchVnets == null || searchVnets.size() == 0){return overlappingVnets;} This helps reduce number of IFs of IFs</technical_language>

Target:
private List<DataCenterVnetVO> findOverlappingVnets(final long dcId, final Long physicalNetworkId, final String vnet) { final List<Integer> searchVnets = UriUtils.expandVlanUri(vnet); final List<DataCenterVnetVO> overlappingVnets = new ArrayList<>(); if (searchVnets == null || searchVnets.isEmpty()) { return overlappingVnets; } SearchCriteria<DataCenterVnetVO> sc = VnetDcSearch.create(); sc.setParameters("dc", dcId); if (physicalNetworkId != null) { sc.setParameters("physicalNetworkId", physicalNetworkId); } for (final DataCenterVnetVO dcVNet : listBy(sc)) { if (dcVNet == null || dcVNet.getVnet() == null) { continue; } final Integer vnetValue = NumbersUtil.parseInt(dcVNet.getVnet(), -1); if (vnetValue != -1 && searchVnets.contains(vnetValue)) { overlappingVnets.add(dcVNet); } } return overlappingVnets; }
Source:
<code>public void onEventMainThread(RegisterTask task) { if(AppPrefs.getInstance(this).isLoggedIn()) { broadcastLogInSuccess(this); Toast.makeText(this, "success register", Toast.LENGTH_SHORT).show(); startActivity(MainActivity.getLaunchIntent(this)); <START> finish(); <END> } else { Toast.makeText(this, "failed register", Toast.LENGTH_SHORT).show(); } }</code><technical_language>I need this anymore handled broadcast receiver. test</technical_language>

Target:
public void onEventMainThread(RegisterTask task) { if(AppPrefs.getInstance(this).isLoggedIn()) { broadcastLogInSuccess(this); Toast.makeText(this, "success register", Toast.LENGTH_SHORT).show(); startActivity(MainActivity.getLaunchIntent(this)); } else { Toast.makeText(this, "failed register", Toast.LENGTH_SHORT).show(); } }
Source:
<code>public boolean afterLRANotification() { boolean notifiedAll = true; if (afterLRAListeners != null) { Client client = ClientBuilder.newClient(); try { Iterator<URI> listeners = afterLRAListeners.iterator(); while (listeners.hasNext()) { URI uri = listeners.next(); Response response = null; try { Future<Response> asyncResponse = client.target(uri) .request() .header(LRA.LRA_HTTP_ENDED_CONTEXT_HEADER, id) .async() .put(Entity.text(status.name())); <START> response = asyncResponse.get(1000, TimeUnit.SECONDS); <END> if (response.getStatus() == 200) { listeners.remove(); } else { notifiedAll = false; } response = null; } catch (WebApplicationException | InterruptedException | ExecutionException | TimeoutException e) { if (LRALogger.logger.isInfoEnabled()) { LRALogger.logger.infof("Could not notify AfterLRA listener at %s (%s)", uri, e.getMessage()); } } finally { if (response != null) { response.close(); } } } } finally { client.close(); } } return notifiedAll; }</code><technical_language>PARTICIPANT_TIMEOUT here? I 1s is enough in normal network conditions</technical_language>

Target:
public boolean afterLRANotification() { boolean notifiedAll = true; if (afterLRAListeners != null) { Client client = ClientBuilder.newClient(); try { Iterator<URI> listeners = afterLRAListeners.iterator(); while (listeners.hasNext()) { URI uri = listeners.next(); Response response = null; try { Future<Response> asyncResponse = client.target(uri) .request() .header(LRA.LRA_HTTP_ENDED_CONTEXT_HEADER, id) .async() .put(Entity.text(status.name())); response = asyncResponse.get(PARTICIPANT_TIMEOUT, TimeUnit.SECONDS); if (response.getStatus() == 200) { listeners.remove(); } else { notifiedAll = false; } response = null; } catch (WebApplicationException | InterruptedException | ExecutionException | TimeoutException e) { notifiedAll = false; if (LRALogger.logger.isInfoEnabled()) { LRALogger.logger.infof("Could not notify AfterLRA listener at %s (%s)", uri, e.getMessage()); } } finally { if (response != null) { response.close(); } } } } finally { client.close(); } } return notifiedAll; }
Source:
<code>public boolean replugNic(final Network network, final NicTO nic, final VirtualMachineTO vm, final ReservationContext context, final DeployDestination dest) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { boolean result = true; final VMInstanceVO router = _vmDao.findById(vm.getId()); if (router.getState() == State.Running) { try { final ReplugNicCommand replugNicCmd = new ReplugNicCommand(nic, vm.getName(), vm.getType(), vm.getDetails()); final Commands cmds = new Commands(Command.OnError.Stop); cmds.addCommand("replugnic", replugNicCmd); _agentMgr.send(dest.getHost().getId(), cmds); final ReplugNicAnswer replugNicAnswer = cmds.getAnswer(ReplugNicAnswer.class); <START> if (!(replugNicAnswer != null && replugNicAnswer.getResult())) { <END> s_logger.warn("Unable to plug nic for vm " + vm.getName()); result = false; } } catch (final OperationTimedoutException e) { throw new AgentUnavailableException("Unable to plug nic for router " + vm.getName() + " in network " + network, dest.getHost().getId(), e); } } else { s_logger.warn("Unable to apply ReplugNic, vm " + router + " is not in the right state " + router.getState()); throw new ResourceUnavailableException("Unable to apply ReplugNic on the backend," + " vm " + vm + " is not in the right state", DataCenter.class, router.getDataCenterId()); } return result; }</code><technical_language>do changing (!(replugNicAnswer != null && replugNicAnswer.getResult())) (replugNicAnswer == null && replugNicAnswer.getResult() == false)? is simpler IMHO. Additionally, I wondering result false replugNicAnswer.getResult() = false; replugNicAnswer != null is sufficient result = true</technical_language>

Target:
public boolean replugNic(final Network network, final NicTO nic, final VirtualMachineTO vm, final ReservationContext context, final DeployDestination dest) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { boolean result = true; final VMInstanceVO router = _vmDao.findById(vm.getId()); if (router.getState() == State.Running) { try { final ReplugNicCommand replugNicCmd = new ReplugNicCommand(nic, vm.getName(), vm.getType(), vm.getDetails()); final Commands cmds = new Commands(Command.OnError.Stop); cmds.addCommand("replugnic", replugNicCmd); _agentMgr.send(dest.getHost().getId(), cmds); final ReplugNicAnswer replugNicAnswer = cmds.getAnswer(ReplugNicAnswer.class); if (replugNicAnswer == null || !replugNicAnswer.getResult()) { s_logger.warn("Unable to replug nic for vm " + vm.getName()); result = false; } } catch (final OperationTimedoutException e) { throw new AgentUnavailableException("Unable to plug nic for router " + vm.getName() + " in network " + network, dest.getHost().getId(), e); } } else { s_logger.warn("Unable to apply ReplugNic, vm " + router + " is not in the right state " + router.getState()); throw new ResourceUnavailableException("Unable to apply ReplugNic on the backend," + " vm " + vm + " is not in the right state", DataCenter.class, router.getDataCenterId()); } return result; }
Source:
<code>private SelectionAdapter createErrorHandlingSelectionAdapter( Text textWidget ) { SelectionAdapterOptions errorOptions = new SelectionAdapterOptions( <START> SelectionOperation.SAVE, <END> new FilterType[] { FilterType.ALL }, FilterType.ALL ); return new SelectionAdapterFileDialogText( log, textWidget, transMeta, errorOptions ); }</code><technical_language>able "SAVE_TO" state is for files save runtime save state</technical_language>

Target:
private SelectionAdapter createErrorHandlingSelectionAdapter( Text textWidget ) { SelectionAdapterOptions errorOptions = new SelectionAdapterOptions( SelectionOperation.FILE_OR_FOLDER, new FilterType[] { FilterType.ALL }, FilterType.ALL ); return new SelectionAdapterFileDialogText( log, textWidget, transMeta, errorOptions ); }
Source:
<code>protected void updateOntologyList() { ontologies.clear(); <START> ontologies.addSelectionHandler(new SelectionHandler<OntologySummaryBean>() { <END> @Override public void onSelection(SelectionEvent<OntologySummaryBean> event) { OntologySummaryBean bean = event.getSelectedItem(); onOntologyClicked(bean); } }); ontologies.setValue(ontologyMap); }</code><technical_language>need add selection handler postConstruct() method. If do here, get called time ontology list is updated, result in multiple identical selection handlers added widget</technical_language>

Target:
protected void updateOntologyList() { ontologies.clear(); ontologies.setValue(ontologyMap); if (uuidNewOntology != null && !uuidNewOntology.equals("") && ontologies.getSelectedOntology() == null) { ontologies.selectItem(uuidNewOntology); } else if (ontologyMap.size() == 1) { ontologies.selectItem(ontologyMap.keySet().iterator().next()); } else if (ontologies.getSelectedOntology() != null) { ontologies.selectItem(ontologies.getSelectedOntology().getUuid()); } }
Source:
<code>public Tuple next() throws SQLException { if (keyIterator == null) { hash = populateHash(); <START> keyList = sortKeys(); <END> keyIterator = keyList.iterator(); } if (!keyIterator.hasNext()) { return null; } ImmutableBytesWritable key = keyIterator.next(); Aggregator[] rowAggregators = hash.get(key); byte[] value = aggregators.toBytes(rowAggregators); Tuple tuple = wrapKeyValueAsResult(KeyValueUtil.newKeyValue(key, SINGLE_COLUMN_FAMILY, SINGLE_COLUMN, AGG_TIMESTAMP, value, 0, value.length)); return tuple; }</code><technical_language>I this sort is required all. guaranteed row a unique row key, subsequent GroupedAggregatingResultIterator work fine (that expects duplicate rows adjacent row is unique, case). If ORDER for groups, Phoenix insert ordering result iterator</technical_language>

Target:
public Tuple next() throws SQLException { if (keyIterator == null) { hash = populateHash(); if (orderBy == OrderBy.FWD_ROW_KEY_ORDER_BY || orderBy == OrderBy.REV_ROW_KEY_ORDER_BY) { keyList = sortKeys(); keyIterator = keyList.iterator(); } else { keyIterator = hash.keySet().iterator(); } } if (!keyIterator.hasNext()) { return null; } ImmutableBytesWritable key = keyIterator.next(); Aggregator[] rowAggregators = hash.get(key); byte[] value = aggregators.toBytes(rowAggregators); Tuple tuple = wrapKeyValueAsResult(PhoenixKeyValueUtil.newKeyValue(key, SINGLE_COLUMN_FAMILY, SINGLE_COLUMN, AGG_TIMESTAMP, value, 0, value.length)); return tuple; }
Source:
<code><START> public List<BrooklinMetricInfo> getMetricInfos() { <END> return DatabaseChunkedReaderMetrics.getMetricInfos(); }</code><technical_language>this static (most need be)</technical_language>

Target:
public static List<BrooklinMetricInfo> getMetricInfos() { return DatabaseChunkedReaderMetrics.getMetricInfos(); }
Source:
<code>public void setCourse(int destX, int destY) { <START> Log.wtf("Plotting", "..."); <END> int srcX = getX(); int srcY = getY(); while (srcX < destX) { if (srcY == destY) { if (destX == srcX) { break; } } else if (srcY < destY) { srcY++; } else { srcY--; } if (srcX != destX) { srcX++; } Log.wtf("Plotting", srcX + "," + srcY); course.add(new Cood(srcX, srcY)); } while (destX <= srcX) { if (srcY == destY) { if (destX == srcX) { break; } } else if (srcY < destY) { srcY++; } else { srcY--; } if (srcX != (destX)) { srcX--; } Log.wtf("Plotting", srcX + "," + srcY); course.add(new Cood(srcX, srcY)); } Log.wtf("Plotting", "Finished"); }</code><technical_language>is this logging level</technical_language>

Target:
public void setCourse(int destX, int destY) { Log.wtf("Plotting", "..."); int srcX = getX(); int srcY = getY(); course.clear(); while (srcX < destX) { if (srcY == destY) { if (destX == srcX) { break; } } else if (srcY < destY) { srcY++; } else { srcY--; } if (srcX != destX) { srcX++; } Log.wtf("Plotting", srcX + "," + srcY); course.add(new Coordinates(srcX, srcY)); } while (destX <= srcX) { if (srcY == destY) { if (destX == srcX) { break; } } else if (srcY < destY) { srcY++; } else { srcY--; } if (srcX != (destX)) { srcX--; } Log.wtf("Plotting", srcX + "," + srcY); course.add(new Coordinates(srcX, srcY)); } Log.wtf("Plotting", "Finished"); }
Source:
<code>public RequestLogger get() { <START> final List<RequestLogger> loggers = Lists.newArrayList(Lists.transform( <END> requestLoggers, new Function<RequestLoggerProvider, RequestLogger>() { @Override public RequestLogger apply(RequestLoggerProvider input) { return input.get(); } } )); return new ComposingRequestLogger(loggers); }</code><technical_language>simpler? For-each loop give a chance off-by-one errors. java final List<RequestLogger> loggers = new ArrayList<>(); for (RequestLoggerProvider loggerProvider : requestLoggers) { loggers.add(loggerProvider.get()); }</technical_language>

Target:
public RequestLogger get() { final List<RequestLogger> loggers = new ArrayList<>(); for (RequestLoggerProvider loggerProvider : loggerProviders) { loggers.add(loggerProvider.get()); } return new ComposingRequestLogger(loggers); }
Source:
<code>public EndNode onboardEndnodeWithGateway( @NonNull PendingEndNode pendingEndNode, @NonNull String endnodePassword) throws ThingIFException { <START> return thingIfApi.onboardEndnodeWithGateway(pendingEndNode, endnodePassword); <END> }</code><technical_language>Adding this a field is good manner</technical_language>

Target:
public EndNode onboardEndnodeWithGateway( @NonNull PendingEndNode pendingEndNode, @NonNull String endnodePassword) throws ThingIFException { return this.thingIfApi.onboardEndnodeWithGateway(pendingEndNode, endnodePassword); }
Source:
<code>private void failure( String message, Exception e ) { <START> failure( message, e, 1 ); <END> }</code><technical_language>useful extract 1, 2,3 useful constants enums code means</technical_language>

Target:
private void failure( String message, Exception e ) { failure( message, e, STATUS_ERROR ); }
Source:
<code>public String getRule() { <START> return "Whenever a player kicks a spell, " + super.getRule(); <END> }</code><technical_language>put trigger text instead of calling super, setText token effect</technical_language>

Target:
public String getRule() { return "Whenever a player kicks a spell, you put a 1/1 green Saproling creature token onto the battlefield."; }
Source:
<code>public static Test suite() { if (CommonTestUtil.fixProxyConfiguration()) { CommonTestUtil.dumpSystemInfo(System.err); } TestConfiguration testConfiguration = ManagedSuite.getTestConfiguration(); if (testConfiguration == null) { testConfiguration = new TestConfiguration(TestKind.UNIT); testConfiguration.setDefaultOnly(CommonTestUtil.runHeartbeatTestsOnly()); <START> ManagedSuite.setTestConfiguration(testConfiguration); <END> } TestSuite suite = new ManagedTestSuite(AllGerritTests.class.getName()); addTests(suite, testConfiguration); return suite; }</code><technical_language>ManagedSuite.getTestConfiguration do this duplicate this everywhere. Also, call TestConfiguration.getDefault()</technical_language>

Target:
public static Test suite() { if (CommonTestUtil.fixProxyConfiguration()) { CommonTestUtil.dumpSystemInfo(System.err); } TestConfiguration testConfiguration = ManagedSuite.getTestConfigurationOrCreateDefault(); TestSuite suite = new ManagedTestSuite(AllGerritTests.class.getName()); addTests(suite, testConfiguration); return suite; }
Source:
<code>public Page<DayActivityOverviewDto<DayActivityWithBuddiesDto>> getUserDayActivityOverviewsWithBuddies(UUID userId, Pageable pageable) { UUID userAnonymizedId = userService.getUserAnonymizedId(userId); UserAnonymizedDto userAnonymized = userAnonymizedService.getUserAnonymized(userAnonymizedId); Interval interval = getInterval(getCurrentDayDate(userAnonymized), pageable, ChronoUnit.DAYS); Set<BuddyDto> buddies = buddyService.getBuddiesOfUserThatAcceptedSending(userId); Set<UUID> userAnonymizedIds = buddies.stream().map(this::getBuddyUserAnonymizedId).collect(Collectors.toSet()); <START> Set<UUID> activityCategoryIds = buddies.stream().map(BuddyDto::getGoals).flatMap(Set::stream) <END> .map(GoalDto::getActivityCategoryId).collect(Collectors.toSet()); userAnonymizedIds.add(userAnonymizedId); Map<ZonedDateTime, Set<DayActivityDto>> dayActivityDtosByZonedDate = executeAndCreateInactivityEntries( mia -> getDayActivitiesForUserAnonymizedIdsInInterval(userAnonymizedIds, activityCategoryIds, interval, mia)); List<DayActivityOverviewDto<DayActivityWithBuddiesDto>> dayActivityOverviews = dayActivityEntitiesToOverviewsUserWithBuddies( dayActivityDtosByZonedDate); return new PageImpl<>(dayActivityOverviews, pageable, getTotalPageableItems(buddies, ChronoUnit.DAYS)); }</code><technical_language>good explain here, e.g.: // Friend results included. results included if some friend a goal in category</technical_language>

Target:
public Page<DayActivityOverviewDto<DayActivityWithBuddiesDto>> getUserDayActivityOverviewsWithBuddies(UUID userId, Pageable pageable) { UUID userAnonymizedId = userService.getUserAnonymizedId(userId); UserAnonymizedDto userAnonymized = userAnonymizedService.getUserAnonymized(userAnonymizedId); Interval interval = getInterval(getCurrentDayDate(userAnonymized), pageable, ChronoUnit.DAYS); Set<BuddyDto> buddies = buddyService.getBuddiesOfUserThatAcceptedSending(userId); Set<UUID> userAnonymizedIds = buddies.stream().map(this::getBuddyUserAnonymizedId).collect(Collectors.toSet()); userAnonymizedIds.add(userAnonymizedId); Set<UUID> activityCategoryIdsUsedByBuddies = buddies.stream().map(BuddyDto::getGoals).flatMap(Set::stream) .map(GoalDto::getActivityCategoryId).collect(Collectors.toSet()); Map<ZonedDateTime, Set<DayActivityDto>> dayActivityDtosByZonedDate = executeAndCreateInactivityEntries( mia -> getDayActivitiesForUserAnonymizedIdsInInterval(userAnonymizedIds, activityCategoryIdsUsedByBuddies, interval, mia)); List<DayActivityOverviewDto<DayActivityWithBuddiesDto>> dayActivityOverviews = dayActivityEntitiesToOverviewsUserWithBuddies( dayActivityDtosByZonedDate); return new PageImpl<>(dayActivityOverviews, pageable, getTotalPageableItems(buddies, ChronoUnit.DAYS)); }
Source:
<code><START> public static boolean shouldShowRequestPermissionRationale(Activity activity, String... permissions) { <END> for (String permission : permissions) { if (ActivityCompat.shouldShowRequestPermissionRationale(activity, permission)) { return true; } } return false; }</code><technical_language>this used</technical_language>

Target:
static boolean shouldShowRequestPermissionRationale(Activity activity, String... permissions) { for (String permission : permissions) { if (ActivityCompat.shouldShowRequestPermissionRationale(activity, permission)) { return true; } } return false; }
Source:
<code>public void testFixedHostPortMapping() throws IOException { final Integer unusedHostPort; String content; try (final GenericContainer echoServer = new GenericContainer<>(TEST_IMAGE) .withExposedPorts(TEST_PORT) .withCommand("/bin/sh", "-c", HTTP_ECHO_CMD)) { echoServer.start(); unusedHostPort = echoServer.getMappedPort(TEST_PORT); content = this.readResponse(echoServer, unusedHostPort); <START> assertThat("Returned echo does not match expected", content, equalTo(TEST_RESPONSE)); <END> } try (final GenericContainer echoServer = new FixedHostPortGenericContainer(TEST_IMAGE) .withFixedExposedPort(unusedHostPort, TEST_PORT) .withExposedPorts(TEST_PORT) .withCommand("/bin/sh", "-c", HTTP_ECHO_CMD)) { echoServer.start(); assertThat("Port mapping does not seem to match given fixed port", echoServer.getMappedPort(TEST_PORT), equalTo(unusedHostPort)); content = this.readResponse(echoServer, unusedHostPort); assertThat("Returned echo from fixed port does not match expected", content, equalTo(TEST_RESPONSE)); } }</code><technical_language>is need assert a random port scenario, is tested separately</technical_language>

Target:
public void testFixedHostPortMapping() throws IOException { final Integer unusedHostPort; try ( final GenericContainer echoServer = new GenericContainer<>(TEST_IMAGE) .withExposedPorts(TEST_PORT) .withCommand("/bin/sh", "-c", HTTP_ECHO_CMD) ) { echoServer.start(); unusedHostPort = echoServer.getMappedPort(TEST_PORT); } try ( final GenericContainer echoServer = new FixedHostPortGenericContainer(TEST_IMAGE) .withFixedExposedPort(unusedHostPort, TEST_PORT) .withExposedPorts(TEST_PORT) .withCommand("/bin/sh", "-c", HTTP_ECHO_CMD) ) { echoServer.start(); assertThat("Port mapping does not seem to match given fixed port", echoServer.getMappedPort(TEST_PORT), equalTo(unusedHostPort)); final String content = this.readResponse(echoServer, unusedHostPort); assertThat("Returned echo from fixed port does not match expected", content, equalTo(TEST_RESPONSE)); } }
Source:
<code><START> public long getMiddlePoint() { return start + end / 2; } <END></code><technical_language>Oops, (start + end) / 2</technical_language>

Target:
public long getMiddlePoint() { return (start + end) / 2; }
Source:
<code>private void emitStaticOverloads(String propName, ObjectType objType, JSType propertyType) { Set<JSType> incompatibleSuperTypes = new LinkedHashSet<>(); collectIncompatibleSuperTypes(objType, propName, incompatibleSuperTypes); for (JSType superPropType : incompatibleSuperTypes) { <START> if (!propertyType.isSubtype(superPropType)) { <END> if (!propertyType.isFunctionType() || !superPropType.isFunctionType()) { errors.add(JSError.make(currentSymbol.getNode(), CLUTZ_OVERRIDDEN_STATIC_FIELD, objType.getDisplayName(), propName)); } else { emit(" "); emitBreak(); emitProperty(propName, superPropType, true); } } } }</code><technical_language>move this check TODO in collectIncompatibleSuperTypes. If type is a subtype, is _compatible_ incompatible</technical_language>

Target:
private void emitStaticOverloads(String propName, ObjectType objType, JSType propertyType) { Set<JSType> incompatibleSuperTypes = getIncompatibleSuperTypes(objType, propName, propertyType); for (JSType superPropType : incompatibleSuperTypes) { if (!propertyType.isFunctionType() || !superPropType.isFunctionType()) { errors.add(JSError.make(currentSymbol.getNode(), CLUTZ_OVERRIDDEN_STATIC_FIELD, objType.getDisplayName(), propName)); } else { emit(" "); emitBreak(); emitProperty(propName, superPropType, true); } } }
Source:
<code>public long appendFrom(ReadableByteChannel channel, long size) throws IOException { <START> int tempIndex = index; <END> index++; int sizeRead = 0; while(sizeRead < size) { sizeRead += channel.read(buflist.get(tempIndex)); tempIndex = index++; } if(sizeRead != size) { throw new IOException("Not able to read entire size. Expected " + size+" Actual " + sizeRead); } return sizeRead; }</code><technical_language>Do need a separate tempIndex variable</technical_language>

Target:
public void appendFrom(ReadableByteChannel channel, long size) throws IOException { int sizeRead = 0; while(sizeRead < size) { sizeRead += channel.read(buflist.get(index++)); } }
Source:
<code>protected void setClientTokenProvider(Quantum client) { String tenantName = <START> ((OpenstackNetworkProviderProperties) provider.getAdditionalProperties()).getTenantName(); <END> KeystoneTokenProvider keystoneTokenProvider = new KeystoneTokenProvider(provider.getAuthUrl(), provider.getUsername(), provider.getPassword()); client.setTokenProvider(keystoneTokenProvider.getProviderByTenant(tenantName)); }</code><technical_language>unneeded cast</technical_language>

Target:
protected void setClientTokenProvider(Quantum client) { String tenantName = provider.getAdditionalProperties().getTenantName(); KeystoneTokenProvider keystoneTokenProvider = new KeystoneTokenProvider(provider.getAuthUrl(), provider.getUsername(), provider.getPassword()); client.setTokenProvider(keystoneTokenProvider.getProviderByTenant(tenantName)); }
Source:
<code>private void wireOutputDataStreams(Map<ComponentType, ComponentBuilder> componentBuilders) { for (Map.Entry<ComponentType, ComponentBuilder> entry : componentBuilders.entrySet()) { ComponentType componentType = entry.getKey(); ComponentBuilder componentBuilder = entry.getValue(); for (OutputDataStreamType outputDataStreamType : componentType.getOutputDataStream()) { String name = outputDataStreamType.getName(); <START> final OutputDataStream outputDataStream = componentBuilder.getOutputDataStream(name); <END> AnalysisJobBuilder outputDataStreamJobBuilder = componentBuilder .getOutputDataStreamJobBuilder(outputDataStream); JobType job = outputDataStreamType.getJob(); List<ColumnType> sourceColumnTypes = job.getSource().getColumns().getColumn(); List<MetaModelInputColumn> sourceColumns = outputDataStreamJobBuilder.getSourceColumns(); final Map<String, InputColumn<?>> inputColumns = new HashMap<>(); for (ColumnType sourceColumnPath : sourceColumnTypes) { for (InputColumn<?> inputColumn : sourceColumns) { if (inputColumn.getName().equals(sourceColumnPath.getPath())) { inputColumns.put(sourceColumnPath.getId(), inputColumn); } } } configureComponents(job, getVariables(job), outputDataStreamJobBuilder, inputColumns); } } }</code><technical_language>Kinda mixed of final final in this method</technical_language>

Target:
private void wireOutputDataStreams(Map<ComponentType, ComponentBuilder> componentBuilders) { for (Map.Entry<ComponentType, ComponentBuilder> entry : componentBuilders.entrySet()) { final ComponentType componentType = entry.getKey(); final ComponentBuilder componentBuilder = entry.getValue(); for (OutputDataStreamType outputDataStreamType : componentType.getOutputDataStream()) { final String name = outputDataStreamType.getName(); final OutputDataStream outputDataStream = componentBuilder.getOutputDataStream(name); final AnalysisJobBuilder outputDataStreamJobBuilder = componentBuilder .getOutputDataStreamJobBuilder(outputDataStream); final JobType job = outputDataStreamType.getJob(); final List<ColumnType> sourceColumnTypes = job.getSource().getColumns().getColumn(); final List<MetaModelInputColumn> sourceColumns = outputDataStreamJobBuilder.getSourceColumns(); final Map<String, InputColumn<?>> inputColumns = new HashMap<>(); for (ColumnType sourceColumnPath : sourceColumnTypes) { for (InputColumn<?> inputColumn : sourceColumns) { if (inputColumn.getName().equals(sourceColumnPath.getPath())) { inputColumns.put(sourceColumnPath.getId(), inputColumn); } } } configureComponents(job, getVariables(job), outputDataStreamJobBuilder, inputColumns); } } }
Source:
<code>private void updateInputSpace(Job job, String inputFolder) throws NotConnectedException, PermissionException { List<String> inputSpaces; if (job.getInputSpace() != null) { inputSpaces = Arrays.asList(Tools.dataSpaceConfigPropertyToUrls(job.getInputSpace())); <START> } else { <END> inputSpaces = getUserSpaceURIs(); } StringBuilder inputSpace_url_updated = new StringBuilder(); for (String inputSpace : inputSpaces) { if (inputSpace_url_updated.length() > 0) { inputSpace_url_updated.append(" "); } inputSpace_url_updated.append(appendSlashIfNeeded(inputSpace)); inputSpace_url_updated.append(inputFolder); } job.setInputSpace(inputSpace_url_updated.toString()); log.debug("Input space of job " + job.getName() + " will be " + inputSpace_url_updated); }</code><technical_language>![MINOR](<LINK_2> 'Severity: MINOR') Remove redundant '!unknownSymbol!' thrown exception declaration(s). [![rule](<LINK_1>](<LINK_0></technical_language>

Target:
private void updateInputSpace(Job job, String inputFolder) throws NotConnectedException, PermissionException { List<String> inputSpaces; if (job.getInputSpace() != null) { inputSpaces = Arrays.asList(Tools.dataSpaceConfigPropertyToUrls(job.getInputSpace())); } else { inputSpaces = getUserSpaceURIs(); } StringBuilder inputSpace_url_updated = buildUpdatedSpaceConfiguration(inputFolder, inputSpaces); job.setInputSpace(inputSpace_url_updated.toString()); log.debug("Input space of job " + job.getName() + " will be " + inputSpace_url_updated); }