auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static ShareType getShareType(String authority) { if (sShareTypes.containsKey(authority)) { return sShareTypes.get(authority); } return null; }

Target:
public static ShareType getShareType(String authority) { return sShareTypes.get(authority); }
Source:
private void compareWithAns(String doc, String ansPath) throws FileNotFoundException { Scanner in = new Scanner(new File(ansPath)); String ansDoc = ""; while (in.hasNext()) { ansDoc += in.nextLine() + "\n"; } doc = StringUtil.replace(doc, "\n", ""); ansDoc = StringUtil.replace(ansDoc, "\n", ""); assertEquals(doc, ansDoc); }

Target:
private void compareWithAns(String doc, String ansPath) throws FileNotFoundException { assertNotNull(doc); Scanner in = new Scanner(new File(ansPath)); String ansDoc = ""; while (in.hasNext()) { ansDoc += in.nextLine(); } doc = StringUtil.replace(doc, "\n", ""); assertEquals(doc, ansDoc); }
Source:
public void quit(boolean isLogout) { if (isLogout) { browserComponent.logout(); } if (browserComponent != null) { browserComponent.onAppQuit(); } if (!isTestMode() || isTestGlobalConfig()) { panels.saveSession(); prefs.saveGlobalConfig(); } if (!isTestMode() || isCloseOnQuit()) { Platform.exit(); System.exit(0); } }

Target:
public void quit(boolean isLogout) { if (browserComponent != null) { browserComponent.onAppQuit(); if (isLogout) { browserComponent.cleanChromeCustomProfile(); } } if (!isTestMode() || isTestGlobalConfig()) { panels.saveSession(); prefs.saveGlobalConfig(); } if (!isTestMode() || isCloseOnQuit()) { Platform.exit(); System.exit(0); } }
Source:
public GerritCommentCountChangeNodeDecorator(SelectedRevisions selectedRevisions) { this.selectedRevisions = selectedRevisions; this.selectedRevisions.addObserver(new Observer() { @Override public void update(Observable o, Object arg) { if (arg instanceof String && selectedChange.id.equals(arg)) { comments = setupCommentsSupplier(); drafts = setupDraftsSupplier(); reviewed = setupReviewedSupplier(); } } }); }

Target:
public GerritCommentCountChangeNodeDecorator(SelectedRevisions selectedRevisions) { this.selectedRevisions = selectedRevisions; this.selectedRevisions.addObserver(new Observer() { @Override public void update(Observable o, Object arg) { if (arg instanceof String && selectedChange != null && selectedChange.id.equals(arg)) { refreshSuppliers(); } } }); }
Source:
private void initializeAnimations(){ boolean isLTR = (ViewCompat.getLayoutDirection(getRootView()) == ViewCompat.LAYOUT_DIRECTION_LTR); mForwardAnimation = new TranslateAnimation(0.0f, isLTR ? ANIMATION_DISPLACEMENT : -ANIMATION_DISPLACEMENT, 0.0f, 0.0f); mForwardAnimation.setDuration(DEFAULT_ANIMATION_DURATION_MS); mForwardAnimation.setInterpolator(new DecelerateInterpolator()); mForwardAnimation.setRepeatCount(0); mForwardAnimation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { mForwardTimeTextView.setVisibility(VISIBLE); } @Override public void onAnimationEnd(Animation animation) { mForwardTimeTextView.setVisibility(GONE); } @Override public void onAnimationRepeat(Animation animation) { } }); mRewindAnimation = new TranslateAnimation(0.0f, !isLTR ? ANIMATION_DISPLACEMENT : -ANIMATION_DISPLACEMENT, 0.0f, 0.0f); mRewindAnimation.setDuration(DEFAULT_ANIMATION_DURATION_MS); mRewindAnimation.setInterpolator(new DecelerateInterpolator()); mRewindAnimation.setRepeatCount(0); mRewindAnimation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { mRewindTimeTextView.setVisibility(VISIBLE); } @Override public void onAnimationEnd(Animation animation) { mRewindTimeTextView.setVisibility(GONE); } @Override public void onAnimationRepeat(Animation animation) { } }); }

Target:
private void initializeAnimations() { boolean isLTRDirection = UiUtil.isDirectionLeftToRight(); mForwardAnimation = ViewAnimationUtil.getSeekTimeAnimation(mForwardTimeTextView, isLTRDirection); mRewindAnimation = ViewAnimationUtil.getSeekTimeAnimation(mRewindTimeTextView, !isLTRDirection); }
Source:
public int compareTo( DurationValue other ) { return unsafeCompareTo( other ); }

Target:
public int compareTo( DurationValue other ) { return COMPARATOR.compare( this, other ); }
Source:
private NPFPacket decipherFromSeqnum(byte[] buf, int offset, int length, SessionKey sessionKey, int sequenceNumber) { BlockCipher ivCipher = sessionKey.ivCipher; byte[] IV = new byte[ivCipher.getBlockSize() / 8]; System.arraycopy(sessionKey.ivNonce, 0, IV, 0, IV.length); IV[IV.length - 4] = (byte) (sequenceNumber >>> 24); IV[IV.length - 3] = (byte) (sequenceNumber >>> 16); IV[IV.length - 2] = (byte) (sequenceNumber >>> 8); IV[IV.length - 1] = (byte) (sequenceNumber); ivCipher.encipher(IV, IV); byte[] payload = Arrays.copyOfRange(buf, offset + hmacLength, offset + length); byte[] hash = Arrays.copyOfRange(buf, offset, offset + hmacLength); if(!HMAC.verifyWithSHA256(sessionKey.hmacKey, payload, hash, HMAC_LENGTH)) return null; PCFBMode payloadCipher = PCFBMode.create(sessionKey.incommingCipher, IV); payloadCipher.blockDecipher(payload, 0, payload.length); NPFPacket p = NPFPacket.create(payload, pn); NewPacketFormatKeyContext keyContext = sessionKey.packetContext; synchronized(this) { if(seqNumGreaterThan(sequenceNumber, keyContext.highestReceivedSeqNum, 31)) { keyContext.highestReceivedSeqNum = sequenceNumber; } } return p; }

Target:
private NPFPacket decipherFromSeqnum(byte[] buf, int offset, int length, SessionKey sessionKey, int sequenceNumber) { BlockCipher ivCipher = sessionKey.ivCipher; byte[] IV = new byte[ivCipher.getBlockSize() / 8]; System.arraycopy(sessionKey.ivNonce, 0, IV, 0, IV.length); IV[IV.length - 4] = (byte) (sequenceNumber >>> 24); IV[IV.length - 3] = (byte) (sequenceNumber >>> 16); IV[IV.length - 2] = (byte) (sequenceNumber >>> 8); IV[IV.length - 1] = (byte) (sequenceNumber); ivCipher.encipher(IV, IV); byte[] payload = Arrays.copyOfRange(buf, offset + hmacLength, offset + length); byte[] hash = Arrays.copyOfRange(buf, offset, offset + hmacLength); if(!HMAC.verifyWithSHA256(sessionKey.hmacKey, payload, hash, hmacLength)) return null; PCFBMode payloadCipher = PCFBMode.create(sessionKey.incommingCipher, IV); payloadCipher.blockDecipher(payload, 0, payload.length); NPFPacket p = NPFPacket.create(payload, pn); NewPacketFormatKeyContext keyContext = sessionKey.packetContext; synchronized(this) { if(seqNumGreaterThan(sequenceNumber, keyContext.highestReceivedSeqNum, 31)) { keyContext.highestReceivedSeqNum = sequenceNumber; } } return p; }
Source:
private void onBoardSaveAs() { logger.info("Menu: Boards > Save as"); List<PanelInfo> panelList = panels.getCurrentPanelInfos(); BoardNameDialog dlg = new BoardNameDialog(prefs, mainStage); Optional<String> response = dlg.showAndWait(); ui.showMainStage(); if (panelList.isEmpty()) { logger.info("Save an empty board"); } else { panels.selectFirstPanel(); } if (response.isPresent()) { String boardName = response.get().trim(); prefs.addBoard(boardName, panelList); prefs.setLastOpenBoard(boardName); ui.triggerEvent(new BoardSavedEvent()); logger.info("New board " + boardName + " saved"); ui.updateTitle(); } }

Target:
private void onBoardSaveAs() { logger.info("Menu: Boards > Save as"); List<PanelInfo> panelList = panels.getCurrentPanelInfos(); BoardNameDialog dlg = new BoardNameDialog(prefs, mainStage); Optional<String> response = dlg.showAndWait(); ui.showMainStage(); panels.selectFirstPanel(); if (response.isPresent()) { String boardName = response.get().trim(); prefs.addBoard(boardName, panelList); prefs.setLastOpenBoard(boardName); ui.triggerEvent(new BoardSavedEvent()); logger.info("New board " + boardName + " saved"); ui.updateTitle(); } }
Source:
public void processNonEntityEnclosingRESTHandler(SOAPEnvelope soapEnvelope, MessageContext msgContext, boolean injectToAxis2Engine) { String soapAction = request.getHeaders().get(SOAP_ACTION_HEADER); if ((soapAction != null) && soapAction.startsWith("\"") && soapAction.endsWith("\"")) { soapAction = soapAction.substring(1, soapAction.length() - 1); } msgContext.setSoapAction(soapAction); msgContext.setTo(new EndpointReference(request.getUri())); msgContext.setServerSide(true); msgContext.setDoingREST(true); if (!(request.isEntityEnclosing())) { msgContext.setProperty(PassThroughConstants.NO_ENTITY_BODY, Boolean.TRUE); } try { if(soapEnvelope == null){ msgContext.setEnvelope(new SOAP11Factory().getDefaultEnvelope()); }else{ msgContext.setEnvelope(soapEnvelope); } if (injectToAxis2Engine) { AxisEngine.receive(msgContext); } } catch (AxisFault axisFault) { consumeInputOnAxisFault(msgContext); handleException("Error processing " + request.getMethod() + " request for : " + request.getUri(), axisFault); } catch (Exception e) { String encodedURL = StringEscapeUtils.escapeHtml(request.getUri()); handleException("Error processing " + request.getMethod() + " request for : " + encodedURL + ". ", e); } }

Target:
public void processNonEntityEnclosingRESTHandler(SOAPEnvelope soapEnvelope, MessageContext msgContext, boolean injectToAxis2Engine) { String soapAction = request.getHeaders().get(SOAP_ACTION_HEADER); if ((soapAction != null) && soapAction.startsWith("\"") && soapAction.endsWith("\"")) { soapAction = soapAction.substring(1, soapAction.length() - 1); } msgContext.setSoapAction(soapAction); msgContext.setTo(new EndpointReference(request.getUri())); msgContext.setServerSide(true); msgContext.setDoingREST(true); if (!(request.isEntityEnclosing())) { msgContext.setProperty(PassThroughConstants.NO_ENTITY_BODY, Boolean.TRUE); } try { if(soapEnvelope == null){ msgContext.setEnvelope(new SOAP11Factory().getDefaultEnvelope()); }else{ msgContext.setEnvelope(soapEnvelope); } if (injectToAxis2Engine) { AxisEngine.receive(msgContext); } } catch (AxisFault axisFault) { handleException("Error processing " + request.getMethod() + " request for : " + request.getUri(), axisFault); } catch (Exception e) { String encodedURL = StringEscapeUtils.escapeHtml(request.getUri()); handleException("Error processing " + request.getMethod() + " request for : " + encodedURL + ". ", e); } }
Source:
public T addHandler( final ViewEventType type, final ViewHandler<? extends ViewEvent> eventHandler ) { if ( supports( type ) ) { if ( ViewEventType.DRAG.equals( type ) ) { final HandlerRegistration[] registrations = registerDragHandler( ( DragHandler ) eventHandler ); if ( null != registrations ) { eventHandlerManager.addHandlersRegistration( type, registrations ); } } else if ( ViewEventType.RESIZE.equals( type ) ) { final HandlerRegistration[] registrations = registerResizeHandler( ( ResizeHandler ) eventHandler ); if ( null != registrations ) { eventHandlerManager.addHandlersRegistration( type, registrations ); } } if ( ViewEventType.TEXT_OVER.equals( type ) ) { textOverHandlerViewHandler = ( ViewHandler<TextOverEvent> ) eventHandler; } { } if ( ViewEventType.TEXT_OUT.equals( type ) ) { textOutEventViewHandler = ( ViewHandler<TextOutEvent> ) eventHandler; } else { eventHandlerManager.addHandler( type, eventHandler ); } } return ( T ) this; }

Target:
public T addHandler( final ViewEventType type, final ViewHandler<? extends ViewEvent> eventHandler ) { if ( supports( type ) ) { if ( ViewEventType.DRAG.equals( type ) ) { final HandlerRegistration[] registrations = registerDragHandler( ( DragHandler ) eventHandler ); if ( null != registrations ) { eventHandlerManager.addHandlersRegistration( type, registrations ); } } else if ( ViewEventType.RESIZE.equals( type ) ) { final HandlerRegistration[] registrations = registerResizeHandler( ( ResizeHandler ) eventHandler ); if ( null != registrations ) { eventHandlerManager.addHandlersRegistration( type, registrations ); } } if ( ViewEventType.TEXT_OVER.equals( type ) ) { textOverHandlerViewHandler = ( ViewHandler<TextOverEvent> ) eventHandler; } if ( ViewEventType.TEXT_OUT.equals( type ) ) { textOutEventViewHandler = ( ViewHandler<TextOutEvent> ) eventHandler; } else { eventHandlerManager.addHandler( type, eventHandler ); } } return ( T ) this; }
Source:
private HUEditorRow(@NonNull final Builder builder) { documentPath = builder.getDocumentPath(); rowId = builder.getRowId(); type = builder.getType(); topLevel = builder.isTopLevel(); processed = builder.isProcessed(); bpartnerId = builder.getBPartnerId(); huId = rowId.getHuId(); code = builder.code; huUnitType = builder.huUnitType; huStatus = builder.huStatus; huReserved = builder.huReserved; huStatusDisplay = builder.huStatusDisplay; packingInfo = builder.packingInfo; product = builder.product; isOwnPalette = builder.isOwnPalette; uom = builder.uom; qtyCU = builder.qtyCU; weightGross = builder.getWeightGross(); bestBeforeDate = builder.getBestBeforeDate(); this.locatorId = builder.locatorId; this.locator = locatorId != null ? JSONLookupValue.of(locatorId, builder.locatorCaption) : null; includedRows = builder.buildIncludedRows(); includedOrderLineReservations = builder.prepareIncludedOrderLineReservations(this); final HUEditorRowAttributesProvider attributesProvider = builder.getAttributesProviderOrNull(); if (attributesProvider != null) { attributesSupplier = Optional.of(HUEditorRowAttributesSupplier.builder() .viewRowId(rowId.toDocumentId()) .huId(huId) .provider(attributesProvider) .build()); } else { attributesSupplier = Optional.empty(); } if (hasAttributes() && attributesSupplier.get().get().hasAttribute(AttributeConstants.ATTR_SerialNo)) { serialNo = attributesSupplier.get().get().getValueAsString(AttributeConstants.ATTR_SerialNo); } else { serialNo = "A"; } }

Target:
private HUEditorRow(@NonNull final Builder builder) { documentPath = builder.getDocumentPath(); rowId = builder.getRowId(); type = builder.getType(); topLevel = builder.isTopLevel(); processed = builder.isProcessed(); bpartnerId = builder.getBPartnerId(); huId = rowId.getHuId(); code = builder.code; huUnitType = builder.huUnitType; huStatus = builder.huStatus; huReserved = builder.huReserved; huStatusDisplay = builder.huStatusDisplay; packingInfo = builder.packingInfo; product = builder.product; isOwnPalette = builder.isOwnPalette; uom = builder.uom; qtyCU = builder.qtyCU; weightGross = builder.getWeightGross(); bestBeforeDate = builder.getBestBeforeDate(); this.locatorId = builder.locatorId; this.locator = locatorId != null ? JSONLookupValue.of(locatorId, builder.locatorCaption) : null; includedRows = builder.buildIncludedRows(); includedOrderLineReservations = builder.prepareIncludedOrderLineReservations(this); final HUEditorRowAttributesProvider attributesProvider = builder.getAttributesProviderOrNull(); if (attributesProvider != null) { attributesSupplier = Optional.of(HUEditorRowAttributesSupplier.builder() .viewRowId(rowId.toDocumentId()) .huId(huId) .provider(attributesProvider) .build()); } else { attributesSupplier = Optional.empty(); } if (attributesSupplier.isPresent() && attributesSupplier.get().get().hasAttribute(AttributeConstants.ATTR_SerialNo)) { serialNo = attributesSupplier.get().get().getValueAsString(AttributeConstants.ATTR_SerialNo); } else { serialNo = null; } }
Source:
private void initDimensionHandlers() { DimensionHandler timeHandler = new LongDimensionHandler(Column.TIME_COLUMN_NAME); DimensionColumnReader timeReader = timeHandler.makeColumnReader(getColumn(Column.TIME_COLUMN_NAME)); dimensionReaders.put(Column.TIME_COLUMN_NAME, timeReader); for (String dim : availableDimensions) { ColumnCapabilities capabilities = getColumn(dim).getCapabilities(); DimensionHandler handler = null; if (capabilities.getType() == ValueType.STRING && capabilities.isDictionaryEncoded()) { handler = new StringDimensionHandler(dim); dimensionHandlers.put(dim, handler); } if (capabilities.getType() == ValueType.LONG && !capabilities.isDictionaryEncoded()) { handler = new LongDimensionHandler(dim); dimensionHandlers.put(dim, handler); } if (capabilities.getType() == ValueType.FLOAT && !capabilities.isDictionaryEncoded()) { handler = new FloatDimensionHandler(dim); dimensionHandlers.put(dim, handler); } DimensionColumnReader reader = handler.makeColumnReader(getColumn(dim)); dimensionReaders.put(dim, reader); } }

Target:
private void initDimensionHandlers() { for (String dim : availableDimensions) { ColumnCapabilities capabilities = getColumn(dim).getCapabilities(); DimensionHandler handler = DimensionHandlerUtil.getHandlerFromCapabilities(dim, capabilities); DimensionColumnReader reader = handler.makeColumnReader(getColumn(dim)); dimensionHandlers.put(dim, handler); dimensionReaders.put(dim, reader); } }
Source:
public static String or(Object... params) { return ""; }

Target:
public static Object or(Object... params) { return ""; }
Source:
public JcloudsSshMachineLocation obtain(Map<?,?> flags) throws NoMachinesAvailableException { ConfigBag setup = ConfigBag.newInstanceExtending(getAllConfigBag(), flags); Integer attempts = setup.get(MACHINE_CREATE_ATTEMPTS); List<Exception> exceptions = Lists.newArrayList(); if (attempts == null || attempts < 1) attempts = 1; for (int i = 1; i <= attempts; i++) { try { return obtainOnce(setup); } catch (RuntimeException e) { LOG.warn("Attempt #{}/{} to obtain machine threw error: {}", new Object[]{i, attempts, e}); exceptions.add(e); } } String msg = format("Failed to get VM after %d attempt%s.", attempts, attempts == 1 ? "" : "s"); Exception cause = (exceptions.size() == 1) ? exceptions.get(0) : new CompoundRuntimeException(msg + " - " + "First cause is "+exceptions.get(0)+" (listed in primary trace); " + "plus " + (exceptions.size()-1) + " more (e.g. the last is "+exceptions.get(exceptions.size()-1)+")", exceptions.get(0), exceptions); if (exceptions.get(exceptions.size()-1) instanceof NoMachinesAvailableException) { throw new NoMachinesAvailableException(msg, cause); } else { throw Exceptions.propagate(cause); } }

Target:
public JcloudsSshMachineLocation obtain(Map<?,?> flags) throws NoMachinesAvailableException { ConfigBag setup = ConfigBag.newInstanceExtending(getAllConfigBag(), flags); Integer attempts = setup.get(MACHINE_CREATE_ATTEMPTS); List<Exception> exceptions = Lists.newArrayList(); if (attempts == null || attempts < 1) attempts = 1; for (int i = 1; i <= attempts; i++) { try { return obtainOnce(setup); } catch (RuntimeException e) { LOG.warn("Attempt #{}/{} to obtain machine threw error: {}", new Object[]{i, attempts, e}); exceptions.add(e); } } String msg = String.format("Failed to get VM after %d attempt%s.", attempts, attempts == 1 ? "" : "s"); Exception cause = (exceptions.size() == 1) ? exceptions.get(0) : new CompoundRuntimeException(msg + " - " + "First cause is "+exceptions.get(0)+" (listed in primary trace); " + "plus " + (exceptions.size()-1) + " more (e.g. the last is "+exceptions.get(exceptions.size()-1)+")", exceptions.get(0), exceptions); if (exceptions.get(exceptions.size()-1) instanceof NoMachinesAvailableException) { throw new NoMachinesAvailableException(msg, cause); } else { throw Exceptions.propagate(cause); } }
Source:
void runUntilCanceled() throws InterruptedException { ExponentialBackOff backoffTracker = null; while (!isCanceled()) { if (Thread.interrupted()) { throw new InterruptedException(); } Collection<Metric> metrics = metricsQueue.poll(batchSize, maxIdleTime); log.debug("Back from polling metricsQueue. metrics.size = {}", null == metrics ? "null" : metrics.size()); log.debug("Checking for shutdown. lastWorkTime = {}; maxIdleTime = {}; sum = {}; currentTime ={}", lastWorkTime, maxIdleTime, lastWorkTime+maxIdleTime, System.currentTimeMillis()); if (metrics.isEmpty() && lastWorkTime > 0 && maxIdleTime > 0 && System.currentTimeMillis() > lastWorkTime + maxIdleTime) { log.info("Shutting down writer due to dearth of work"); break; } if (metrics.isEmpty()) { log.debug("No work to do, so checking again."); continue; } if (backoffTracker == null) { backoffTracker = createExponentialBackOff(); } try { processBatch(metrics); backoffTracker.reset(); } catch (NoSuchElementException e) { long backOff = this.minBackOff; try { backOff = backoffTracker.nextBackOffMillis(); } catch (IOException e1) { log.debug("caught IOException backing off tracker - should go to default backOff."); } if (ExponentialBackOff.STOP == backOff) { backOff = backoffTracker.getMaxIntervalMillis(); log.warn("Error getting OpenTsdbClient after ms: {}", backoffTracker.getElapsedTimeMillis(), e.getMessage()); } log.debug("Connection back off, sleeping ms", backOff); Thread.sleep(backOff); } catch (Exception e) { log.error("Caught exception processing batch or backing off tracker.", e); } } log.debug("work canceled."); }

Target:
void runUntilCanceled() throws InterruptedException { ExponentialBackOff backoffTracker = null; while (!isCanceled()) { if (Thread.interrupted()) { throw new InterruptedException(); } Collection<Metric> metrics = metricsQueue.poll(batchSize, maxIdleTime); log.debug("Back from polling metricsQueue. metrics.size = {}", null == metrics ? "null" : metrics.size()); log.debug("Checking for shutdown. lastWorkTime = {}; maxIdleTime = {}; sum = {}; currentTime ={}", lastWorkTime, maxIdleTime, lastWorkTime+maxIdleTime, System.currentTimeMillis()); if (metrics.isEmpty() && lastWorkTime > 0 && maxIdleTime > 0 && System.currentTimeMillis() > lastWorkTime + maxIdleTime) { log.info("Shutting down writer due to dearth of work"); break; } if (metrics.isEmpty()) { log.debug("No work to do, so checking again."); continue; } if (backoffTracker == null) { backoffTracker = createExponentialBackOff(); } try { processBatch(metrics); backoffTracker.reset(); } catch (NoSuchElementException e) { long backOff = this.minBackOff; try { backOff = backoffTracker.nextBackOffMillis(); } catch (IOException e1) { log.debug("caught IOException backing off tracker - should go to default backOff."); } if (ExponentialBackOff.STOP == backOff) { backOff = backoffTracker.getMaxIntervalMillis(); log.warn("Error getting OpenTsdbClient after ms: {}", backoffTracker.getElapsedTimeMillis(), e.getMessage()); } log.debug("Connection back off, sleeping ms", backOff); Thread.sleep(backOff); } } log.debug("work canceled."); }
Source:
public Object getParameter(String name) { if (name.equals(CriticalPathModule.PARAM_WORKER)) { final HostThread currentHostThread = fCurrentHostThread; if (currentHostThread == null) { return null; } IAnalysisModule mod = getModule(); if ((mod != null) && (mod instanceof CriticalPathModule)) { LttngWorker worker = new LttngWorker(currentHostThread, "", 0); return worker; } return currentHostThread; } return null; }

Target:
public Object getParameter(String name) { if (name.equals(CriticalPathModule.PARAM_WORKER)) { final HostThread currentHostThread = fCurrentHostThread; if (currentHostThread == null) { return null; } IAnalysisModule mod = getModule(); if ((mod != null) && (mod instanceof CriticalPathModule)) { LttngWorker worker = new LttngWorker(currentHostThread, "", 0); return worker; } } return null; }
Source:
private byte[] readGitDirectoryFile(String filename) throws IOException { File file = new File(getDirectory(), filename); byte[] raw; try { raw = IO.readFully(file); } catch (FileNotFoundException notFound) { return null; } if (raw.length == 0) return null; return raw; }

Target:
private byte[] readGitDirectoryFile(String filename) throws IOException { File file = new File(getDirectory(), filename); try { byte[] raw = IO.readFully(file); return raw.length > 0 ? raw : null; } catch (FileNotFoundException notFound) { return null; } }
Source:
public T toObject(ProtobufCodec<T> codec, Provider<T> provider) { if (object == null) { this.codec = codec; if (provider == null) { object = codec.decode(buf); } else { object = provider.get(); try { codec.mergeFrom(CodedInputStream.newInstance(buf), object); } catch (IOException e) { throw new RuntimeException("Cannot decode message", e); } } buf = null; } return object; }

Target:
T toObject(ProtobufCodec<T> codec, Provider<T> provider) { if (object == null) { this.codec = codec; if (provider == null) { object = codec.decode(buf); } else { object = provider.get(); codec.mergeFrom(buf, object); } buf = null; } return object; }
Source:
public int hashCode() { return Objects.hash(options, readOptions, lookupOptions, physicalSchema, dialectName); }

Target:
public int hashCode() { return Objects.hash(options, readOptions, lookupOptions, physicalSchema, dialectName, limit); }
Source:
public void close() throws IOException { synchronized (this) { if(closed) { return; } closed = true; channelAssociation.shutdown(); if (strategy != null) { StreamUtils.safeClose(strategy); strategy = null; } final Endpoint endpoint = this.endpoint; if (endpoint != null) { this.endpoint = null; try { endpoint.closeAsync(); } catch (UnsupportedOperationException ignored) { } } channelAssociation.shutdownNow(); try { channelAssociation.awaitCompletion(1, TimeUnit.SECONDS); } catch (InterruptedException ignore) { Thread.currentThread().interrupt(); } finally { StreamUtils.safeClose(clientConfiguration); } if (endpoint != null) endpoint.awaitClosedUninterruptibly(); } }

Target:
public void close() throws IOException { synchronized (this) { if(closed) { return; } closed = true; channelAssociation.shutdown(); if (strategy != null) { StreamUtils.safeClose(strategy); strategy = null; } final Endpoint endpoint = this.endpoint; if (endpoint != null) { this.endpoint = null; try { endpoint.closeAsync(); } catch (UnsupportedOperationException ignored) { } } channelAssociation.shutdownNow(); try { channelAssociation.awaitCompletion(1, TimeUnit.SECONDS); } catch (InterruptedException ignore) { Thread.currentThread().interrupt(); } finally { StreamUtils.safeClose(clientConfiguration); } if (endpoint != null) try { endpoint.awaitClosed(); } catch (InterruptedException e) { final InterruptedIOException cause = new InterruptedIOException(e.getLocalizedMessage()); cause.initCause(e); throw cause; } } }
Source:
public void testSymlinkAttributes() throws Exception { if (!canCreateSymLinks()) return; makeLinkStructure(); assertFalse(iFile.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertFalse(iDir.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertTrue(ilFile.exists()); assertFalse(ilFile.isDirectory()); assertTrue(illFile.exists()); assertFalse(illFile.isDirectory()); assertTrue(ilDir.exists()); assertTrue(ilDir.isDirectory()); assertTrue(illDir.exists()); assertTrue(illDir.isDirectory()); assertEquals(iFile.getLastModified(), illFile.getLastModified()); assertEquals(iFile.getLength(), illFile.getLength()); assertEquals(iDir.getLastModified(), illDir.getLastModified()); assertEquals(iDir.getLength(), illDir.getLength()); assertTrue(ilFile.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(ilFile.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "aFile"); assertTrue(ilDir.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(ilDir.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "aDir"); assertTrue(illFile.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(illFile.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "lFile"); assertTrue(illDir.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(illDir.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "lDir"); }

Target:
public void testSymlinkAttributes() { if (!canCreateSymLinks()) return; makeLinkStructure(); assertFalse(iFile.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertFalse(iDir.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertTrue(ilFile.exists()); assertFalse(ilFile.isDirectory()); assertTrue(illFile.exists()); assertFalse(illFile.isDirectory()); assertTrue(ilDir.exists()); assertTrue(ilDir.isDirectory()); assertTrue(illDir.exists()); assertTrue(illDir.isDirectory()); assertEquals(iFile.getLastModified(), illFile.getLastModified()); assertEquals(iFile.getLength(), illFile.getLength()); assertEquals(iDir.getLastModified(), illDir.getLastModified()); assertEquals(iDir.getLength(), illDir.getLength()); assertTrue(ilFile.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(ilFile.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "aFile"); assertTrue(ilDir.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(ilDir.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "aDir"); assertTrue(illFile.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(illFile.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "lFile"); assertTrue(illDir.getAttribute(EFS.ATTRIBUTE_SYMLINK)); assertEquals(illDir.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET), "lDir"); }
Source:
private void restoreDialog() { IDialogSettings dialogSettings = getDialogSettings(); if (dialogSettings != null) { try { dialogHeight = dialogSettings.getInt(DIALOG_HEIGHT); dialogWidth = dialogSettings.getInt(DIALOG_WIDTH); } catch (NumberFormatException e) { dialogHeight = -1; dialogWidth = -1; } isLoadingPreviousElements = true; UIJob refreshQuickAccessContents = new UIJob("Finish restoring quick access elements") { @Override public IStatus runInUIThread(IProgressMonitor monitor) { quickAccessContents.refresh(quickAccessContents.filterText.getText()); return Status.OK_STATUS; } }; refreshQuickAccessContents.setSystem(true); restoreDialogEntriesJob = new Job("Restore quick access elements") { @Override protected IStatus run(IProgressMonitor monitor) { try { restoreDialogEntries(dialogSettings, monitor); return Status.OK_STATUS; } catch (OperationCanceledException e) { return Status.CANCEL_STATUS; } finally { isLoadingPreviousElements = false; refreshQuickAccessContents.schedule(); } } }; restoreDialogEntriesJob.schedule(); } }

Target:
private void restoreDialog() { IDialogSettings dialogSettings = getDialogSettings(); if (dialogSettings != null) { try { dialogHeight = dialogSettings.getInt(DIALOG_HEIGHT); dialogWidth = dialogSettings.getInt(DIALOG_WIDTH); } catch (NumberFormatException e) { dialogHeight = -1; dialogWidth = -1; } isLoadingPreviousElements = true; refreshQuickAccessContents = new UIJob("Finish restoring quick access elements") { @Override public IStatus runInUIThread(IProgressMonitor monitor) { quickAccessContents.refresh(quickAccessContents.filterText.getText()); return Status.OK_STATUS; } }; refreshQuickAccessContents.setSystem(true); restoreDialogEntriesJob = new Job("Restore quick access elements") { @Override protected IStatus run(IProgressMonitor monitor) { try { restoreDialogEntries(dialogSettings, monitor); return Status.OK_STATUS; } catch (OperationCanceledException e) { return Status.CANCEL_STATUS; } finally { isLoadingPreviousElements = false; refreshQuickAccessContents.schedule(); } } }; restoreDialogEntriesJob.schedule(); } }
Source:
public SonarLintJobManager(Project project) { this.messageBus = project.getMessageBus(); myProject = project; Application application = ApplicationManager.getApplication(); application.getMessageBus().connect(this).subscribe(ProjectManager.TOPIC, this); }

Target:
public SonarLintJobManager(Project project) { this.messageBus = project.getMessageBus(); myProject = project; project.getMessageBus().connect().subscribe(ProjectManager.TOPIC, new ProjectManagerListener() { @Override public void projectOpened(@NotNull Project project) { if (myProject == project) { executor.shutdownNow(); } } }); }
Source:
StartupConfiguration(Supplier<NodeContext> nodeContextSupplier, boolean unConfigured, boolean repairMode, ClassLoader classLoader, PathResolver pathResolver, IParameterSubstitutor substitutor, ObjectMapperFactory objectMapperFactory) { this.nodeContextSupplier = requireNonNull(nodeContextSupplier); this.unConfigured = unConfigured; this.repairMode = repairMode; this.classLoader = requireNonNull(classLoader); this.pathResolver = requireNonNull(pathResolver); this.substitutor = requireNonNull(substitutor); this.objectMapper = objectMapperFactory.create(); this.groupPortMapper = ManagedServiceLoader.loadServices(GroupPortMapper.class, GroupPortMapper.class.getClassLoader()) .stream().findFirst().get(); }

Target:
StartupConfiguration(Supplier<NodeContext> nodeContextSupplier, boolean unConfigured, boolean repairMode, ClassLoader classLoader, PathResolver pathResolver, IParameterSubstitutor substitutor, ObjectMapperFactory objectMapperFactory) { this.nodeContextSupplier = requireNonNull(nodeContextSupplier); this.unConfigured = unConfigured; this.repairMode = repairMode; this.classLoader = requireNonNull(classLoader); this.pathResolver = requireNonNull(pathResolver); this.substitutor = requireNonNull(substitutor); this.objectMapper = objectMapperFactory.create(); this.groupPortMapper = ManagedServiceLoader.loadServices(GroupPortMapper.class, this.classLoader).stream().findFirst().get(); }
Source:
public static boolean isIgnored(IPath path) throws IOException { RepositoryMapping mapping = RepositoryMapping.getMapping(path); if (mapping == null) return true; Repository repository = mapping.getRepository(); String repoRelativePath = mapping.getRepoRelativePath(path); TreeWalk walk = new TreeWalk(repository); walk.addTree(new FileTreeIterator(repository)); walk.setFilter(PathFilter.create(repoRelativePath)); while (walk.next()) { WorkingTreeIterator workingTreeIterator = walk.getTree(0, WorkingTreeIterator.class); if (walk.getPathString().equals(repoRelativePath)) return workingTreeIterator.isEntryIgnored(); if (workingTreeIterator.getEntryFileMode().equals(FileMode.TREE)) walk.enterSubtree(); } return false; }

Target:
public static boolean isIgnored(IPath path) throws IOException { RepositoryMapping mapping = RepositoryMapping.getMapping(path); if (mapping == null) return true; Repository repository = mapping.getRepository(); String repoRelativePath = mapping.getRepoRelativePath(path); TreeWalk walk = new TreeWalk(repository); try { walk.addTree(new FileTreeIterator(repository)); walk.setFilter(PathFilter.create(repoRelativePath)); while (walk.next()) { WorkingTreeIterator workingTreeIterator = walk.getTree(0, WorkingTreeIterator.class); if (walk.getPathString().equals(repoRelativePath)) return workingTreeIterator.isEntryIgnored(); if (workingTreeIterator.getEntryFileMode() .equals(FileMode.TREE)) walk.enterSubtree(); } } finally { walk.release(); } return false; }
Source:
protected int verifyDataOnly(SimpleBinaryByteBuffer inBuffer) { try { inBuffer.flip(); if (logger.isDebugEnabled()) { logger.debug("{} - Verifying data, lenght={} bytes", toString(), inBuffer.limit()); } int receivedID = inBuffer.get(); inBuffer.rewind(); SimpleBinaryMessage itemData = SimpleBinaryProtocol.decompileData(inBuffer, itemsConfig, deviceName, true); if (itemData != null) { return receivedID; } } catch (Exception ex) { logger.error("{} - Verify data error: {}", toString(), ex.getMessage()); } finally { try { inBuffer.compact(); if (logger.isDebugEnabled()) { logger.debug("{} - Verify data OK, lenght={} bytes", toString(), inBuffer.position()); } } catch (ModeChangeException e) { } } return -1; }

Target:
protected SimpleBinaryMessage verifyDataOnly(SimpleBinaryByteBuffer inBuffer) { try { inBuffer.flip(); if (logger.isDebugEnabled()) { logger.debug("{} - Verifying data, lenght={} bytes", toString(), inBuffer.limit()); } byte receivedID = inBuffer.get(); inBuffer.rewind(); SimpleBinaryMessage itemData = SimpleBinaryProtocol.decompileData(inBuffer, itemsConfig, deviceName, true); if (itemData != null) { return itemData; } } catch (Exception ex) { logger.error("{} - Verify data error: {}", toString(), ex.getMessage()); } finally { try { inBuffer.compact(); if (logger.isDebugEnabled()) { logger.debug("{} - Verify data OK, lenght={} bytes", toString(), inBuffer.position()); } } catch (ModeChangeException ex) { logger.error("{} - Bad operation: {}", this.toString(), ex.getMessage()); } } return null; }
Source:
private static String computeWWWAuthenticateHeaderValue(Map<String, String> parameters) { final StringBuilder wwwAuthenticate = new StringBuilder(); wwwAuthenticate.append("Bearer"); if (!parameters.isEmpty()) { wwwAuthenticate.append(" "); int i = 0; for (Map.Entry<String, String> entry : parameters.entrySet()) { wwwAuthenticate.append(entry.getKey()).append("=\"").append(entry.getValue()).append("\""); if (i != parameters.size() - 1) { wwwAuthenticate.append(", "); } i++; } } return wwwAuthenticate.toString(); }

Target:
private static String computeWWWAuthenticateHeaderValue(Map<String, String> parameters) { StringBuilder wwwAuthenticate = new StringBuilder(); wwwAuthenticate.append("Bearer"); if (!parameters.isEmpty()) { wwwAuthenticate.append(" "); int i = 0; for (Map.Entry<String, String> entry : parameters.entrySet()) { wwwAuthenticate.append(entry.getKey()).append("=\"").append(entry.getValue()).append("\""); if (i != parameters.size() - 1) { wwwAuthenticate.append(", "); } i++; } } return wwwAuthenticate.toString(); }
Source:
public List<APIObject> getEarlyStoppingCriteria() { return Utils.mergeIntoList(new ArrayList<APIObject>(), this.get("early_stopping_criteria"), APIObject.class); }

Target:
public List<TrainingMonitorStoppingCriteria> getEarlyStoppingCriteria() { return Utils.mergeIntoList( new ArrayList<TrainingMonitorStoppingCriteria>(), this.get("early_stopping_criteria"), TrainingMonitorStoppingCriteria.class ); }
Source:
public JeeConfigurer<H> mappableAuthorities(String... mappableRoles) { this.mappableRoles.clear(); this.mappableRoles.addAll(Arrays.asList(mappableRoles)); return this; }

Target:
public JeeConfigurer<H> mappableAuthorities(String... mappableRoles) { this.mappableRoles.clear(); for (String role : mappableRoles) { this.mappableRoles.add(role); } return this; }
Source:
public RollupCollector(CollectorConfig collectorConfig, Schema schema) { _keySize = schema.getColumnNames().size() - schema.getMetricNames().size(); _valueSize = schema.getMetricNames().size(); _keyColumns = new String[_keySize]; _valueColumns = new String[_valueSize]; _valueAggregators = new ValueAggregator[_valueSize]; _metricFieldSpecs = new MetricFieldSpec[_valueSize]; Map<String, ValueAggregatorFactory.ValueAggregatorType> aggregatorTypeMap = collectorConfig.getAggregatorTypeMap(); if (aggregatorTypeMap == null) { aggregatorTypeMap = Collections.emptyMap(); } int valIdx = 0; int keyIdx = 0; for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) { if (!fieldSpec.isVirtualColumn()) { String name = fieldSpec.getName(); if (fieldSpec.getFieldType().equals(FieldSpec.FieldType.METRIC)) { _metricFieldSpecs[valIdx] = (MetricFieldSpec) fieldSpec; _valueColumns[valIdx] = name; _valueAggregators[valIdx] = ValueAggregatorFactory.getValueAggregator( aggregatorTypeMap.getOrDefault(name, ValueAggregatorFactory.ValueAggregatorType.SUM).toString()); valIdx++; } else { _keyColumns[keyIdx++] = name; } } } }

Target:
public RollupCollector(CollectorConfig collectorConfig, Schema schema) { int keySize = 0; int valueSize = 0; for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) { if (!fieldSpec.isVirtualColumn()) { if (fieldSpec.getFieldType() == FieldSpec.FieldType.METRIC) { valueSize ++; } else { keySize ++; } } } _keySize = keySize; _valueSize = valueSize; _keyColumns = new String[_keySize]; _valueColumns = new String[_valueSize]; _valueAggregators = new ValueAggregator[_valueSize]; Map<String, ValueAggregatorFactory.ValueAggregatorType> aggregatorTypeMap = collectorConfig.getAggregatorTypeMap(); if (aggregatorTypeMap == null) { aggregatorTypeMap = Collections.emptyMap(); } int valIdx = 0; int keyIdx = 0; for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) { if (!fieldSpec.isVirtualColumn()) { String name = fieldSpec.getName(); if (fieldSpec.getFieldType() == FieldSpec.FieldType.METRIC) { _valueColumns[valIdx] = name; ValueAggregatorFactory.ValueAggregatorType aggregatorType = aggregatorTypeMap.getOrDefault(name, ValueAggregatorFactory.ValueAggregatorType.SUM); _valueAggregators[valIdx] = ValueAggregatorFactory.getValueAggregator(aggregatorType.toString(), fieldSpec.getDataType()); valIdx++; } else { _keyColumns[keyIdx++] = name; } } } List<String> sortOrder = collectorConfig.getSortOrder(); if (CollectionUtils.isNotEmpty(sortOrder)) { _sorter = new GenericRowSorter(sortOrder, schema); } else { _sorter = null; } }
Source:
public static AccessControl forName(String localName) { final AccessControl value = localName != null ? MAP.get(localName.toLowerCase()) : null; return value == null ? AccessControl.valueOf(localName.toUpperCase()) : value; }

Target:
public static AccessControl forName(String localName) { final AccessControl value = localName != null ? MAP.get(localName.toLowerCase(Locale.ENGLISH)) : null; return value == null ? AccessControl.valueOf(localName.toUpperCase(Locale.ENGLISH)) : value; }
Source:
public void testKinesisClientLibConfigurationShouldGetProxyInfoFromPropertiesFile() throws Exception { String PROPERTIES = "executableName = randomEXE \n" + "applicationName = testApp \n" + "streamName = fakeStream \n" + "AWSCredentialsProvider = DefaultAWSCredentialsProviderChain\n" + "http.proxyHost = <LINK_0>\n" + "http.proxyPort = 1234\n" + "processingLanguage = malbolge"; ClassLoader classLoader = Mockito.mock(ClassLoader.class); Mockito.doReturn(new ByteArrayInputStream(PROPERTIES.getBytes())).when(classLoader) .getResourceAsStream(FILENAME); MultiLangDaemonConfig config = new MultiLangDaemonConfig(FILENAME, classLoader, buildMockConfigurator()); assertAgainstKclConfig(config.getKinesisClientLibConfiguration(), "<LINK_0>", 1234); }

Target:
public void testKinesisClientLibConfigurationShouldGetProxyInfoFromPropertiesFile() throws Exception { String properties = "executableName = randomEXE \n" + "applicationName = testApp \n" + "streamName = fakeStream \n" + "AWSCredentialsProvider = DefaultAWSCredentialsProviderChain\n" + "http.proxyHost = <LINK_0>\n" + "http.proxyPort = 1234\n" + "processingLanguage = malbolge"; ClassLoader classLoader = Mockito.mock(ClassLoader.class); Mockito.doReturn(new ByteArrayInputStream(properties.getBytes())).when(classLoader) .getResourceAsStream(FILENAME); MultiLangDaemonConfig config = new MultiLangDaemonConfig(FILENAME, classLoader, buildMockConfigurator()); assertAgainstKclConfig(config.getKinesisClientLibConfiguration(), "<LINK_0>", 1234); }
Source:
public Optional<HostLocation> get() { OkHttpClient client = new OkHttpClient.Builder() .build(); try { Response response = client.newCall(new Request.Builder() .get() .url("<LINK_0>") .build()) .execute(); checkState(response.isSuccessful(), "Getting AWS host metadata was not successful"); String responseString = response.body().string(); String datacentre = responseString.substring(0, responseString.length()-2); String rack = responseString.substring(responseString.length()-1); return Optional.of(HostLocation.of(datacentre, rack)); } catch (IOException e) { throw new RuntimeException("Could not communicate with AWS host metadata", e); } }

Target:
public HostLocation get() { try { Response response = client.newCall(new Request.Builder() .get() .url("<LINK_0>") .build()) .execute(); Preconditions.checkState(response.isSuccessful(), "Getting AWS host metadata was not successful"); String responseString = response.body().string(); String datacenter = responseString.substring(0, responseString.length() - 2); String rack = responseString.substring(responseString.length() - 1); return HostLocation.of(datacenter, rack); } catch (IOException e) { throw new RuntimeException(e); } }
Source:
protected int getScrollLimitX() { return mScaledWidth - getWidth() + FloatMathHelper.scale(mExtraBorder, mScale); }

Target:
protected int getScrollLimitX() { return mScaledWidth - getWidth() + mScaledImagePadding; }
Source:
public void compute( final IterableInterval< T > input, final Img< DoubleType > output ) { final int numDimensions = input.numDimensions(); if ( input.numDimensions() != 2 ) { throw new IllegalArgumentException( "Cannot compute Hough circle transform for non-2D images. Got " + numDimensions + "D image." ); } maxRadius = Math.max( minRadius, maxRadius ); minRadius = Math.min( minRadius, maxRadius ); final long nRadiuses = ( maxRadius - minRadius ) / stepRadius + 1; final double sum = ops().stats().sum( input ).getRealDouble(); int progress = 0; final Cursor< T > cursor = input.localizingCursor(); while ( cursor.hasNext() ) { cursor.fwd(); if ( !cursor.get().get() ) continue; for ( int i = 0; i < nRadiuses; i++ ) { final IntervalView< DoubleType > slice = Views.hyperSlice( output, numDimensions, i ); final long r = minRadius + i * stepRadius; MidPointAlgorithm.inc( Views.extendZero( slice ), cursor, r ); } statusService.showProgress( ++progress, ( int ) sum ); } }

Target:
public void compute(final IterableInterval<T> input, final Img<DoubleType> output) { final long maxR = Math.max(minRadius, maxRadius); final long minR = Math.min(minRadius, maxRadius); maxRadius = maxR; minRadius = minR; final long nRadiuses = (maxRadius - minRadius) / stepRadius + 1; final double sum = ops().stats().sum(input).getRealDouble(); int progress = 0; final Cursor<T> cursor = input.localizingCursor(); while (cursor.hasNext()) { cursor.fwd(); if (!cursor.get().get()) continue; for (int i = 0; i < nRadiuses; i++) { final IntervalView<DoubleType> slice = Views.hyperSlice(output, input .numDimensions(), i); final long r = minRadius + i * stepRadius; MidPointAlgorithm.inc(Views.extendZero(slice), cursor, r); } statusService.showProgress(++progress, (int) sum); } }
Source:
public <T extends HelixProperty> Map<String, T> getChildValuesMap(PropertyKey key, boolean throwException) { return new HashMap<>(); }

Target:
public <T extends HelixProperty> Map<String, T> getChildValuesMap(PropertyKey key, boolean throwException) { return Collections.emptyMap(); }
Source:
private void InitVdsBroker() { log.infoFormat("Initialize vdsBroker ({0},{1})", _vds.getHostName(), _vds.getPort()); int clientTimeOut = Config.<Integer> getValue(ConfigValues.vdsTimeout) * 1000; int connectionTimeOut = Config.<Integer> getValue(ConfigValues.vdsConnectionTimeout) * 1000; int heartBeat = Config.<Integer> getValue(ConfigValues.vdsHeartbeat) * 1000; int clientRetries = Config.<Integer> getValue(ConfigValues.vdsRetries); _vdsProxy = TransportFactory.createVdsServer(_vds.getProtocol(), _vds.getHostName(), _vds.getPort(), clientTimeOut, connectionTimeOut, clientRetries, heartBeat); }

Target:
private void InitVdsBroker() { log.infoFormat("Initialize vdsBroker ({0},{1})", _vds.getHostName(), _vds.getPort()); int clientTimeOut = Config.<Integer> getValue(ConfigValues.vdsTimeout) * 1000; int connectionTimeOut = Config.<Integer> getValue(ConfigValues.vdsConnectionTimeout) * 1000; int heartbeat = Config.<Integer> getValue(ConfigValues.vdsHeartbeatInSeconds) * 1000; int clientRetries = Config.<Integer> getValue(ConfigValues.vdsRetries); _vdsProxy = TransportFactory.createVdsServer(_vds.getProtocol(), _vds.getHostName(), _vds.getPort(), clientTimeOut, connectionTimeOut, clientRetries, heartbeat); }
Source:
public void save(LUNs lun) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() .addValue("LUN_id", lun.getLUN_id()) .addValue("physical_volume_id", lun.getphysical_volume_id()) .addValue("volume_group_id", lun.getvolume_group_id()) .addValue("serial", lun.getSerial()) .addValue("lun_mapping", lun.getLunMapping()) .addValue("vendor_id", lun.getVendorId()) .addValue("product_id", lun.getProductId()) .addValue("device_size", lun.getDeviceSize()) .addValue("disk_id", lun.getDiskId()) .addValue("disk_alias", lun.getDiskAlias()) .addValue("storage_id", lun.getStorageDomainId()) .addValue("storage_name", lun.getStorageDomainName()); getCallsHandler().executeModification("InsertLUNs", parameterSource); }

Target:
public void save(LUNs lun) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() .addValue("LUN_id", lun.getLUN_id()) .addValue("physical_volume_id", lun.getphysical_volume_id()) .addValue("volume_group_id", lun.getvolume_group_id()) .addValue("serial", lun.getSerial()) .addValue("lun_mapping", lun.getLunMapping()) .addValue("vendor_id", lun.getVendorId()) .addValue("product_id", lun.getProductId()) .addValue("device_size", lun.getDeviceSize()); getCallsHandler().executeModification("InsertLUNs", parameterSource); }