auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void undeploy(String namespace, Deployment deployment) { if (namespace == null || namespace.isEmpty() || deployment == null) { throw new IllegalArgumentException(); } Map<String, Deployment> deploymentsMap = namespaceDeploymentsMap.get(namespace); if (deploymentsMap == null) { throw new RuntimeException("Deployment [" + deployment + "] not found in namespace " + namespace); } if (deploymentsMap.get(deployment.getId()) != null) { deploymentsMap.remove(deployment.getId()); } }

Target:
public void undeploy(String namespace, Deployment deployment) { if (namespace == null || namespace.isEmpty() || deployment == null) { throw new IllegalArgumentException(); } Map<String, Deployment> deploymentsMap = namespaceDeploymentsMap.get(namespace); if (deploymentsMap == null) { throw new RuntimeException("Deployment [" + deployment + "] not found in namespace " + namespace); } deploymentsMap.remove(deployment.getId()); }
Source:
protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { synchronized (getClassLoadingLock(name)) { ClassLoader oldClassloader = Plugins.compareAndSwapLoaders(this); Class<?> klass = findLoadedClass(name); if (klass == null) { try { if (PluginUtils.shouldLoadInIsolation(name)) { klass = findClass(name); } } catch (ClassNotFoundException e) { log.trace("Class '{}' not found. Delegating to parent", name); } } if (klass == null) { klass = super.loadClass(name, false); } if (resolve) { resolveClass(klass); } Plugins.compareAndSwapLoaders(oldClassloader); return klass; } }

Target:
protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { synchronized (getClassLoadingLock(name)) { Class<?> klass = findLoadedClass(name); if (klass == null) { try { if (PluginUtils.shouldLoadInIsolation(name)) { klass = findClass(name); } } catch (ClassNotFoundException e) { log.trace("Class '{}' not found. Delegating to parent", name); } } if (klass == null) { klass = super.loadClass(name, false); } if (resolve) { resolveClass(klass); } return klass; } }
Source:
private void inbound(final Object message) throws IOException { if (message instanceof SipServletRequest) { final SipServletRequest request = (SipServletRequest) message; SipURI uri = (SipURI) request.getFrom().getURI(); final String from = uri.getUser(); uri = (SipURI) request.getTo().getURI(); final String to = uri.getUser(); String body = null; if (request.getContentLength() > 0) { body = new String(request.getRawContent()); } Iterator<String> headerIt = request.getHeaderNames(); while (headerIt.hasNext()) { String headerName = headerIt.next(); if (headerName.startsWith("X-")) { customRequestHeaderMap.put(headerName, request.getHeader(headerName)); } } last = new SmsSessionRequest(from, to, body, Encoding.GSM, customRequestHeaderMap, this.tlvSet); if (initial == null) { initial = last; } final ActorRef self = self(); for (final ActorRef observer : observers) { observer.tell(last, self); } } else if (message instanceof SmppInboundMessageEntity) { final SmppInboundMessageEntity request = (SmppInboundMessageEntity) message; final SmsSessionRequest.Encoding encoding; if(request.getSmppEncoding().equals(CharsetUtil.CHARSET_UCS_2)) { encoding = SmsSessionRequest.Encoding.UCS_2; } else { encoding = SmsSessionRequest.Encoding.GSM; } last = new SmsSessionRequest (request.getSmppFrom(), request.getSmppTo(), request.getSmppContent(), encoding, null, request.getTlvSet()); if (initial == null) { initial = last; } for (final ActorRef observer : observers) { observer.tell(last, self()); } } }

Target:
private void inbound(final Object message) throws IOException { if (message instanceof SipServletRequest) { final SipServletRequest request = (SipServletRequest) message; SipURI uri = (SipURI) request.getFrom().getURI(); final String from = uri.getUser(); uri = (SipURI) request.getTo().getURI(); final String to = uri.getUser(); String body = null; if (request.getContentLength() > 0) { body = new String(request.getRawContent()); } Iterator<String> headerIt = request.getHeaderNames(); while (headerIt.hasNext()) { String headerName = headerIt.next(); if (headerName.startsWith("X-")) { customRequestHeaderMap.put(headerName, request.getHeader(headerName)); } } last = new SmsSessionRequest(from, to, body, this.tlvSet, customRequestHeaderMap); if (initial == null) { initial = last; } final ActorRef self = self(); for (final ActorRef observer : observers) { observer.tell(last, self); } } else if (message instanceof SmppInboundMessageEntity) { final SmppInboundMessageEntity request = (SmppInboundMessageEntity) message; final SmsSessionRequest.Encoding encoding; if(request.getSmppEncoding().equals(CharsetUtil.CHARSET_UCS_2)) { encoding = SmsSessionRequest.Encoding.UCS_2; } else { encoding = SmsSessionRequest.Encoding.GSM; } last = new SmsSessionRequest (request.getSmppFrom(), request.getSmppTo(), request.getSmppContent(), encoding, request.getTlvSet(), null); if (initial == null) { initial = last; } for (final ActorRef observer : observers) { observer.tell(last, self()); } } }
Source:
public ProtocolType getProtocolType() { if (version == GlowServer.PROTOCOL_VERSION) return ProtocolType.PLAY; if (version == GlowServer.LEGACY_PROTOCOL_VERSION) return ProtocolType.PLAY_107; if (version == GlowServer.COMPATIBLE_PROTOCOL_VERSION) return ProtocolType.PLAY_109; return null; }

Target:
public ProtocolType getProtocolType() { switch (version) { case GlowServer.PROTOCOL_VERSION: return ProtocolType.PLAY; case GlowServer.LEGACY_PROTOCOL_1_9: return ProtocolType.PLAY_107; case GlowServer.LEGACY_PROTOCOL_1_9_2: return ProtocolType.PLAY_109; } return null; }
Source:
public void updateContributionItems(Selector selector) { for (final AbstractContributionItem ci : itemsToCheck) { if (ci.getModel() != null && ci.getModel().getParent() != null) { if (selector.select(ci.getModel())) { itemsToUpdateLater.add(ci); count++; if (count > 100) { run(); count = 0; } else Display.getDefault().timerExec(DELAY, this); } } else { orphanedToolItems.add(ci); } } if (!orphanedToolItems.isEmpty()) { itemsToCheck.removeAll(orphanedToolItems); orphanedToolItems.clear(); } }

Target:
public void updateContributionItems(Selector selector) { for (final AbstractContributionItem ci : itemsToCheck) { if (ci.getModel() != null && ci.getModel().getParent() != null) { if (selector.select(ci.getModel())) { itemsToUpdateLater.add(ci); count++; if (count > 100) { run(); } else { Display.getDefault().timerExec(DELAY, this); } } } else { orphanedToolItems.add(ci); } } if (!orphanedToolItems.isEmpty()) { itemsToCheck.removeAll(orphanedToolItems); orphanedToolItems.clear(); } }
Source:
public static boolean isZippedContent(byte[] bin) { return bin.length > 4 && bin[0] == 'P' && bin[1] == 'K' && bin[2] == 3 && bin[3] == 4; }

Target:
public static boolean isZippedContent(byte[] bin) { return bin != null && bin.length > 4 && bin[0] == 'P' && bin[1] == 'K' && bin[2] == 3 && bin[3] == 4; }
Source:
protected void initVm() { if (!isInitVmRequired()) { return; } fetchVmDisksFromDb(); updateVmDevicesOnRun(); updateGraphicsAndDisplayInfos(); getVm().setRunAndPause(getParameters().getRunAndPause() == null ? getVm().isRunAndPause() : getParameters().getRunAndPause()); getVm().setConsoleUserId(null); updateVmInit(); if (!StringUtils.isEmpty(getParameters().getFloppyPath()) && isPayloadExists(VmDeviceType.FLOPPY)) { vmPayload = null; } updateVmGuestAgentVersion(); if (!getVm().isUseHostCpuFlags() && !getVm().getCustomCpuName().equals("hostPassthrough") && getVm().getCpuName() == null) { if (getVm().getCustomCpuName() != null) { getVm().setCpuName(getVm().getCustomCpuName()); } else { getVm().setCpuName(getCpuFlagsManagerHandler().getCpuId( getVm().getClusterCpuName(), getVm().getCompatibilityVersion())); } } if (getVm().getEmulatedMachine() == null) { getVm().setEmulatedMachine(getEffectiveEmulatedMachine()); } }

Target:
protected void initVm() { if (!isInitVmRequired()) { return; } fetchVmDisksFromDb(); updateVmDevicesOnRun(); updateGraphicsAndDisplayInfos(); getVm().setRunAndPause(getParameters().getRunAndPause() == null ? getVm().isRunAndPause() : getParameters().getRunAndPause()); getVm().setConsoleUserId(null); updateVmInit(); if (!StringUtils.isEmpty(getParameters().getFloppyPath()) && isPayloadExists(VmDeviceType.FLOPPY)) { vmPayload = null; } updateVmGuestAgentVersion(); if (!getVm().isUsingCpuPassthrough() && getVm().getCpuName() == null) { if (getVm().getCustomCpuName() != null) { getVm().setCpuName(getVm().getCustomCpuName()); } else { getVm().setCpuName(getCpuFlagsManagerHandler().getCpuId( getVm().getClusterCpuName(), getVm().getCompatibilityVersion())); } } if (getVm().getEmulatedMachine() == null) { getVm().setEmulatedMachine(getEffectiveEmulatedMachine()); } }
Source:
private void writeOtherOccurrencesToFileAsCSV(File destFile) { try (BufferedWriter writer = Files.newBufferedWriter(destFile.toPath())) { StringBuilder headers = new StringBuilder(""); headers.append('"').append(Bundle.DataContentViewerOtherCasesModel_csvHeader_case()).append('"').append(','); headers.append('"').append(Bundle.DataContentViewerOtherCasesModel_csvHeader_dataSource()).append('"').append(','); headers.append('"').append(Bundle.DataContentViewerOtherCasesModel_csvHeader_attribute()).append('"').append(','); headers.append('"').append(Bundle.DataContentViewerOtherCasesModel_csvHeader_value()).append('"').append(','); headers.append('"').append(Bundle.DataContentViewerOtherCasesModel_csvHeader_known()).append('"').append(','); headers.append('"').append(Bundle.DataContentViewerOtherCasesModel_csvHeader_path()).append('"').append(','); headers.append('"').append(Bundle.DataContentViewerOtherCasesModel_csvHeader_comment()).append('"').append(System.getProperty("line.separator")); writer.write(headers.toString()); for (CorrelationAttributeInstance corAttr : correlationAttributes) { Map<UniquePathKey, OtherOccurrenceNodeInstanceData> correlatedNodeDataMap = new HashMap<>(0); correlatedNodeDataMap.putAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId)); for (OtherOccurrenceNodeInstanceData nodeData : correlatedNodeDataMap.values()) { writer.write(nodeData.toCsvString()); } } } catch (IOException ex) { LOGGER.log(Level.SEVERE, "Error writing selected rows to CSV.", ex); } }

Target:
private void writeOtherOccurrencesToFileAsCSV(File destFile) { try (BufferedWriter writer = Files.newBufferedWriter(destFile.toPath())) { StringBuilder headers = new StringBuilder("\""); headers.append(Bundle.DataContentViewerOtherCasesModel_csvHeader_case()) .append(OtherOccurrenceNodeInstanceData.getCsvItemSeparator()).append(Bundle.DataContentViewerOtherCasesModel_csvHeader_dataSource()) .append(OtherOccurrenceNodeInstanceData.getCsvItemSeparator()).append(Bundle.DataContentViewerOtherCasesModel_csvHeader_attribute()) .append(OtherOccurrenceNodeInstanceData.getCsvItemSeparator()).append(Bundle.DataContentViewerOtherCasesModel_csvHeader_value()) .append(OtherOccurrenceNodeInstanceData.getCsvItemSeparator()).append(Bundle.DataContentViewerOtherCasesModel_csvHeader_known()) .append(OtherOccurrenceNodeInstanceData.getCsvItemSeparator()).append(Bundle.DataContentViewerOtherCasesModel_csvHeader_path()) .append(OtherOccurrenceNodeInstanceData.getCsvItemSeparator()).append(Bundle.DataContentViewerOtherCasesModel_csvHeader_comment()) .append('"').append(System.getProperty("line.separator")); writer.write(headers.toString()); for (CorrelationAttributeInstance corAttr : correlationAttributes) { Map<UniquePathKey, OtherOccurrenceNodeInstanceData> correlatedNodeDataMap = new HashMap<>(0); correlatedNodeDataMap.putAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId)); for (OtherOccurrenceNodeInstanceData nodeData : correlatedNodeDataMap.values()) { writer.write(nodeData.toCsvString()); } } } catch (IOException ex) { LOGGER.log(Level.SEVERE, "Error writing selected rows to CSV.", ex); } }
Source:
public Builder runCmds(List<String> theCmds) { config.runCmds = theCmds; return this; }

Target:
public Builder runCmds(List<String> theCmds) { if (config.runCmds == null) { config.runCmds = new ArrayList<String>(); } else config.runCmds = theCmds; return this; }
Source:
private Object[][] finderSupportedResourceTypeData() { return new Object[][] { { FinderSupportedAssociationDataResource.class }, { FinderSupportedComplexKeyDataResource.class }, { FinderWithActionResource.class } }; }

Target:
private Object[][] finderSupportedResourceTypeData() { return new Object[][] { { FinderSupportedAssociationDataResource.class }, { FinderSupportedComplexKeyDataResource.class } }; }
Source:
public void close() throws IOException { boolean triedToClose = false, success = false; try { flush(); ((FileOutputStream)out).getChannel().force(true); triedToClose = true; super.close(); success = true; } finally { if (success) { boolean renamed = tmpFile.renameTo(origFile); if (!renamed) { if (origFile.exists()) { try { Files.delete(origFile.toPath()); } catch (IOException e) { throw new IOException("Could not delete original file " + origFile + " due to: " + e); } } try { NativeIO.renameTo(tmpFile, origFile); } catch (NativeIOException e) { throw new IOException("Could not rename temporary file " + tmpFile + " to " + origFile + " due to failure in native rename. " + e.toString()); } } } else { if (!triedToClose) { IOUtils.closeStream(out); } if (!tmpFile.delete()) { LOG.warn("Unable to delete tmp file " + tmpFile); } } } }

Target:
public void close() throws IOException { boolean triedToClose = false, success = false; try { flush(); ((FileOutputStream)out).getChannel().force(true); triedToClose = true; super.close(); success = true; } finally { if (success) { boolean renamed = tmpFile.renameTo(origFile); if (!renamed) { if (origFile.exists()) { try { Files.delete(origFile.toPath()); } catch (IOException e) { throw new IOException("Could not delete original file " + origFile, e); } } try { NativeIO.renameTo(tmpFile, origFile); } catch (NativeIOException e) { throw new IOException("Could not rename temporary file " + tmpFile + " to " + origFile + " due to failure in native rename. " + e.toString()); } } } else { if (!triedToClose) { IOUtils.closeStream(out); } if (!tmpFile.delete()) { LOG.warn("Unable to delete tmp file " + tmpFile); } } } }
Source:
private java.security.Signature getSignature(X509Certificate certificate) throws SignatureException { String jceSigAlgo = certificate.getSigAlgName(); java.security.Signature signature; try { if ("DSA".equalsIgnoreCase(certificate.getPublicKey().getAlgorithm())) { signature = java.security.Signature.getInstance(jceSigAlgo, "BC"); } else { signature = java.security.Signature.getInstance(jceSigAlgo); } } catch (NoSuchAlgorithmException | NoSuchProviderException e) { throw new SignatureException(e); } return signature; }

Target:
private java.security.Signature getSignature(X509Certificate certificate) throws SignatureException { java.security.Signature signature; try { if ("DSA".equalsIgnoreCase(certificate.getPublicKey().getAlgorithm())) { signature = java.security.Signature.getInstance(DSA_ALGO_JCE, "BC"); } else { signature = java.security.Signature.getInstance(RSA_ALGO_JCE); } } catch (NoSuchAlgorithmException | NoSuchProviderException e) { throw new SignatureException(e); } return signature; }
Source:
private void closeConfirmationWindow() { getConfirmWindow().stopProgress(); setConfirmWindow(null); }

Target:
private void closeConfirmationWindow() { if(getConfirmWindow() == null) { return; } getConfirmWindow().stopProgress(); setConfirmWindow(null); }
Source:
protected void onResume() { super.onResume(); if (!isSHREnable()){ onBackPressed(); } }

Target:
protected void onResume() { super.onResume(); if (!isSHREnabled()){ onBackPressed(); } }
Source:
public TmfXYChartViewer(Composite parent, String title, String xLabel, String yLabel) { super(parent, title); fSwtChart = new Chart(parent, SWT.NONE) { @Override public boolean setFocus() { return fSwtChart.getPlotArea().setFocus(); } }; fSwtChart.getPlotArea().addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { fSwtChart.getPlotArea().setFocus(); } }); IAxis xAxis = fSwtChart.getAxisSet().getXAxis(0); IAxis yAxis = fSwtChart.getAxisSet().getYAxis(0); if (title == null) { fSwtChart.getTitle().setVisible(false); } else { fSwtChart.getTitle().setText(title); } if (xLabel == null) { xAxis.getTitle().setVisible(false); } else { xAxis.getTitle().setText(xLabel); } if (yLabel == null) { yAxis.getTitle().setVisible(false); } else { yAxis.getTitle().setText(yLabel); } fMouseSelectionProvider = new TmfMouseSelectionProvider(this); fMouseDragZoomProvider = new TmfMouseDragZoomProvider(this); fMouseWheelZoomProvider = new TmfMouseWheelZoomProvider(this); fToolTipProvider = new TmfSimpleTooltipProvider(this); fMouseDragProvider = new TmfMouseDragProvider(this); fSwtChart.addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { internalDispose(); } }); }

Target:
public TmfXYChartViewer(Composite parent, String title, String xLabel, String yLabel) { super(parent, title); fSwtChart = new Chart(parent, SWT.NONE) { @Override public boolean setFocus() { return fSwtChart.getPlotArea().setFocus(); } }; fSwtChart.getPlotArea().addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { fSwtChart.getPlotArea().setFocus(); } }); IAxis xAxis = fSwtChart.getAxisSet().getXAxis(0); IAxis yAxis = fSwtChart.getAxisSet().getYAxis(0); if (title == null) { fSwtChart.getTitle().setVisible(false); } else { fSwtChart.getTitle().setText(title); } if (xLabel == null) { xAxis.getTitle().setVisible(false); } else { xAxis.getTitle().setText(xLabel); } if (yLabel == null) { yAxis.getTitle().setVisible(false); } else { yAxis.getTitle().setText(yLabel); } fMouseSelectionProvider = new TmfMouseSelectionProvider(this); fMouseDragZoomProvider = new TmfMouseDragZoomProvider(this); fMouseWheelZoomProvider = new TmfMouseWheelZoomProvider(this); fToolTipProvider = new TmfSimpleTooltipProvider(this); fMouseDragProvider = new TmfMouseDragProvider(this); fSwtChart.addDisposeListener((e) -> { internalDispose(); }); }
Source:
private BlobId(DataInputStream stream, ClusterMap clusterMap, boolean ensureFullyRead) throws IOException { version = stream.readShort(); switch (version) { case BLOB_ID_V1: type = BlobIdType.NATIVE; datacenterId = UNKNOWN_DATACENTER_ID; accountId = UNKNOWN_ACCOUNT_ID; containerId = UNKNOWN_CONTAINER_ID; break; case BLOB_ID_V2: stream.readByte(); type = BlobIdType.NATIVE; datacenterId = stream.readByte(); accountId = stream.readShort(); containerId = stream.readShort(); break; case BLOB_ID_V3: type = BlobIdType.values()[stream.readByte()]; datacenterId = stream.readByte(); accountId = stream.readShort(); containerId = stream.readShort(); break; default: throw new IllegalArgumentException("blobId version " + version + " not supported."); } partitionId = clusterMap.getPartitionIdFromStream(stream); if (partitionId == null) { throw new IllegalArgumentException("Partition ID cannot be null"); } uuid = Utils.readIntString(stream); if (ensureFullyRead && stream.read() != -1) { throw new IllegalArgumentException("Stream should have no more available bytes to read"); } }

Target:
private BlobId(DataInputStream stream, ClusterMap clusterMap, boolean ensureFullyRead) throws IOException { version = stream.readShort(); switch (version) { case BLOB_ID_V1: type = BlobIdType.NATIVE; datacenterId = UNKNOWN_DATACENTER_ID; accountId = UNKNOWN_ACCOUNT_ID; containerId = UNKNOWN_CONTAINER_ID; break; case BLOB_ID_V2: stream.readByte(); type = BlobIdType.NATIVE; datacenterId = stream.readByte(); accountId = stream.readShort(); containerId = stream.readShort(); break; case BLOB_ID_V3: type = BlobIdType.values()[stream.readByte() & 0x3]; datacenterId = stream.readByte(); accountId = stream.readShort(); containerId = stream.readShort(); break; default: throw new IllegalArgumentException("blobId version " + version + " not supported."); } partitionId = clusterMap.getPartitionIdFromStream(stream); if (partitionId == null) { throw new IllegalArgumentException("Partition ID cannot be null"); } uuid = Utils.readIntString(stream); if (ensureFullyRead && stream.read() != -1) { throw new IllegalArgumentException("Stream should have no more available bytes to read"); } }
Source:
public AdvancedModelWrapper(OpenEngSBModel model) { super(model); }

Target:
protected AdvancedModelWrapper(OpenEngSBModel model) { super(model); }
Source:
public void checkResponseShouldReturnExceptionWithNoResponseBody() throws Exception { thrown.expect(ConstructorException.class); thrown.expectMessage("io.constructor.client.ConstructorException: Server error (418)"); Response response = Utils.createResponse(418, ""); assertTrue("response checks true ", ConstructorIO.checkResponse(response)); }

Target:
public void checkResponseShouldReturnExceptionWithNoResponseBody() throws Exception { thrown.expect(ConstructorException.class); thrown.expectMessage("io.constructor.client.ConstructorException: [HTTP 418]"); String body = ""; Response response = Utils.createResponse(418, body); ConstructorIO.checkResponse(response); }
Source:
public Integer getLength() { return length > 0 ? length : null; }

Target:
public Integer getLength() { return end > -1 ? end - index : null; }
Source:
private boolean isCounterUpdateRequired(NotificationCache nCache) { if (new Date().getTime() - nCache.getLastCounterUpdate().getTime() > COUNTER_UPDATE_INTERVAL_IN_MS) { return true; } else { return false; } }

Target:
private boolean isCounterUpdateRequired(NotificationCache nCache) { return new Date().getTime() - nCache.getLastCounterUpdate().getTime() > COUNTER_UPDATE_INTERVAL_IN_MS; }
Source:
protected SetValue<String> constructValue(Set<String> actualValue) { return new SpongeSetValue<>(Keys.TAGS, Collections.<String>emptySet(), actualValue); }

Target:
protected SetValue<String> constructValue(Set<String> actualValue) { return new SpongeSetValue<>(Keys.TAGS, Collections.emptySet(), actualValue); }
Source:
public void testNullPath() { System.clearProperty("ddf.home"); AbsolutePathResolver apr = new AbsolutePathResolver(null); assertThat(apr.getPath(), nullValue()); assertThat(apr.getPath("root"), nullValue()); }

Target:
public void testNullPath() { System.clearProperty("ddf.home"); AbsolutePathResolver apr = new AbsolutePathResolver(null); assertThat(apr.getPath(), nullValue()); }
Source:
public void start() { startTime = System.currentTimeMillis(); }

Target:
public void start()
Source:
public void memberShouldCorrectlyRedirectPingMessage() throws IOException, InterruptedException { final String poolName = testName.getMethodName(); parametrizedSetUp(poolName, asList(server1Port, server2Port)); InternalDistributedMember distributedMember1 = (InternalDistributedMember) server1 .invoke(() -> cacheRule.getCache().getDistributedSystem().getDistributedMember()); InternalDistributedMember distributedMember2 = (InternalDistributedMember) server2 .invoke(() -> cacheRule.getCache().getDistributedSystem().getDistributedMember()); client.invoke(() -> executePing(poolName, server1Port, distributedMember1)); client.invoke(() -> executePing(poolName, server2Port, distributedMember2)); Long firstHeartbeatServer1 = server1.invoke(this::getSingleHeartBeat); Long firstHeartbeatServer2 = server2.invoke(this::getSingleHeartBeat); client.invoke(() -> executePing(poolName, server1Port, distributedMember2)); Long secondHeartbeatServer1 = server1.invoke(this::getSingleHeartBeat); Long secondHeartbeatServer2 = server2.invoke(this::getSingleHeartBeat); assertThat(secondHeartbeatServer1).isEqualTo(firstHeartbeatServer1); assertThat(secondHeartbeatServer2).isGreaterThan(firstHeartbeatServer2); }

Target:
public void memberShouldCorrectlyRedirectPingMessage() { final String poolName = testName.getMethodName(); parametrizedSetUp(poolName, asList(server1Port, server2Port)); InternalDistributedMember distributedMember1 = (InternalDistributedMember) server1 .invoke(() -> cacheRule.getCache().getDistributedSystem().getDistributedMember()); InternalDistributedMember distributedMember2 = (InternalDistributedMember) server2 .invoke(() -> cacheRule.getCache().getDistributedSystem().getDistributedMember()); client.invoke(() -> executePing(poolName, server1Port, distributedMember1)); client.invoke(() -> executePing(poolName, server2Port, distributedMember2)); Long firstHeartbeatServer1 = server1.invoke(this::getSingleHeartBeat); Long firstHeartbeatServer2 = server2.invoke(this::getSingleHeartBeat); client.invoke(() -> executePing(poolName, server1Port, distributedMember2)); Long secondHeartbeatServer1 = server1.invoke(this::getSingleHeartBeat); Long secondHeartbeatServer2 = server2.invoke(this::getSingleHeartBeat); assertThat(secondHeartbeatServer1).isEqualTo(firstHeartbeatServer1); assertThat(secondHeartbeatServer2).isGreaterThan(firstHeartbeatServer2); }
Source:
private Bitmap decodeStream(InputStream stream, Request data) throws IOException { if (stream == null) { return null; } BitmapFactory.Options options = null; if (data.needInSampleSize()) { options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; InputStream is = getInputStream(); try { BitmapFactory.decodeStream(is, null, options); } finally { Utils.closeQuietly(is); } if (data.hasSize()) { calculateInSampleSize(data.targetWidth, data.targetHeight, options); } if (!data.overTextureSize) { calculateMaxTextureSizeInSampleSize(options); } } return BitmapFactory.decodeStream(stream, null, options); }

Target:
private Bitmap decodeStream(InputStream stream, Request data) throws IOException { if (stream == null) { return null; } BitmapFactory.Options options = null; if (data.needInSampleSize()) { options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; InputStream is = getInputStream(); try { BitmapFactory.decodeStream(is, null, options); } finally { Utils.closeQuietly(is); } calculateInSampleSize(data, options); } return BitmapFactory.decodeStream(stream, null, options); }
Source:
public Advice[] getAdviceChain() { return adviceChain; }

Target:
public Advice[] getAdviceChain() { return this.adviceChain; }
Source:
public static void setPortSide(final LPort port) { LNode portDummy = port.getProperty(InternalProperties.PORT_DUMMY); if (portDummy != null) { port.setSide(portDummy.getProperty(InternalProperties.EXT_PORT_SIDE)); } else if (port.getNetFlow() < 0) { port.setSide(PortSide.EAST); } else { port.setSide(PortSide.WEST); } if (!port.isExplicitlySuppliedPortAnchor()) { KVector portSize = port.getSize(); KVector portAnchor = port.getAnchor(); switch (port.getSide()) { case NORTH: portAnchor.x = portSize.x / 2; portAnchor.y = 0; break; case EAST: portAnchor.x = portSize.x; portAnchor.y = portSize.y / 2; break; case SOUTH: portAnchor.x = portSize.x / 2; portAnchor.y = portSize.y; break; case WEST: portAnchor.x = 0; portAnchor.y = portSize.y / 2; break; } } }

Target:
public static void setPortSide(final LPort port) { LNode portDummy = port.getProperty(InternalProperties.PORT_DUMMY); if (portDummy != null) { port.setSide(portDummy.getProperty(InternalProperties.EXT_PORT_SIDE)); } else if (port.getNetFlow() < 0) { port.setSide(PortSide.EAST); } else { port.setSide(PortSide.WEST); } }
Source:
public void testBroadcastCorrelatedSubqueryAvoidsRemoteExchangeBeforeAggregation() { Session broadcastJoin = Session.builder(this.getQueryRunner().getDefaultSession()) .setSystemProperty(DISTRIBUTED_JOIN, Boolean.toString(false)) .setSystemProperty(FORCE_SINGLE_NODE_OUTPUT, Boolean.toString(false)) .build(); assertEquals( countOfMatchingNodes( plan("SELECT (SELECT count(*) FROM region r2 WHERE r2.regionkey > r1.regionkey) FROM region r1", OPTIMIZED_AND_VALIDATED, broadcastJoin, false), node -> node instanceof ExchangeNode && ((ExchangeNode) node).getScope() == REMOTE), 1); assertEquals( countOfMatchingNodes( plan( "SELECT count(count) " + "FROM (SELECT o1.orderkey orderkey, (SELECT count(*) FROM orders o2 WHERE o2.orderkey > o1.orderkey) count FROM orders o1) " + "GROUP BY orderkey", OPTIMIZED_AND_VALIDATED, broadcastJoin, false), node -> node instanceof ExchangeNode && ((ExchangeNode) node).getScope() == REMOTE), 1); }

Target:
public void testBroadcastCorrelatedSubqueryAvoidsRemoteExchangeBeforeAggregation() { Session broadcastJoin = Session.builder(this.getQueryRunner().getDefaultSession()) .setSystemProperty(DISTRIBUTED_JOIN, Boolean.toString(false)) .setSystemProperty(FORCE_SINGLE_NODE_OUTPUT, Boolean.toString(false)) .build(); PlanMatchPattern joinBuildSideWithRemoteExchange = anyTree( node(JoinNode.class, anyTree( node(TableScanNode.class)), anyTree( exchange(REMOTE, ExchangeNode.Type.REPLICATE, anyTree( node(TableScanNode.class)))))); Consumer<Plan> validateSingleRemoteExchange = plan -> assertEquals( countOfMatchingNodes( plan, node -> node instanceof ExchangeNode && ((ExchangeNode) node).getScope() == REMOTE), 1); assertPlanWithSession( "SELECT (SELECT count(*) FROM region r2 WHERE r2.regionkey > r1.regionkey) FROM region r1", broadcastJoin, false, joinBuildSideWithRemoteExchange, validateSingleRemoteExchange); assertPlanWithSession( "SELECT count(count) " + "FROM (SELECT o1.orderkey orderkey, (SELECT count(*) FROM orders o2 WHERE o2.orderkey > o1.orderkey) count FROM orders o1) " + "GROUP BY orderkey", broadcastJoin, false, joinBuildSideWithRemoteExchange, validateSingleRemoteExchange); }
Source:
public StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition, SiddhiQueryContext siddhiQueryContext) { try { SnapshotService.getSkipStateStorageThreadLocal().set(true); if (latencyTrackerFind != null && Level.BASIC.compareTo(siddhiQueryContext.getSiddhiAppContext().getRootMetricsLevel()) <= 0) { latencyTrackerFind.markIn(); throughputTrackerFind.eventIn(); } if (!isFirstEventArrived) { this.recreateInMemoryData.recreateInMemoryData(); } return ((IncrementalAggregateCompileCondition) compiledCondition).find(matchingEvent, aggregationDefinition, incrementalExecutorMap, aggregationTables, baseExecutorsForFind, outputExpressionExecutors, siddhiQueryContext, aggregateProcessExpressionExecutorsListForFind, groupByKeyGeneratorList, shouldUpdateTimestamp); } finally { SnapshotService.getSkipStateStorageThreadLocal().set(null); if (latencyTrackerFind != null && Level.BASIC.compareTo(siddhiQueryContext.getSiddhiAppContext().getRootMetricsLevel()) <= 0) { latencyTrackerFind.markOut(); } } }

Target:
public StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition, SiddhiQueryContext siddhiQueryContext) { try { SnapshotService.getSkipStateStorageThreadLocal().set(true); if (latencyTrackerFind != null && Level.BASIC.compareTo(siddhiQueryContext.getSiddhiAppContext().getRootMetricsLevel()) <= 0) { latencyTrackerFind.markIn(); throughputTrackerFind.eventIn(); } if (!isDistributed && !isFirstEventArrived) { recreateInMemoryData(false); } return ((IncrementalAggregateCompileCondition) compiledCondition).find(matchingEvent, aggregationDefinition, incrementalExecutorMap, aggregationTables, baseExecutorsForFind, outputExpressionExecutors, siddhiQueryContext, aggregateProcessExpressionExecutorsListForFind, groupByKeyGeneratorList, shouldUpdateTimestamp); } finally { SnapshotService.getSkipStateStorageThreadLocal().set(null); if (latencyTrackerFind != null && Level.BASIC.compareTo(siddhiQueryContext.getSiddhiAppContext().getRootMetricsLevel()) <= 0) { latencyTrackerFind.markOut(); } } }
Source:
public void viewChainOfTrust() { chainOfTrust = new HashMap<>(); selectedCertsChain = new ArrayList<>(); if (null == selectedTSCertificate) { HelperUtil.addMessageError(TRUST_STORE_MSG, "Please choose a certificate to view-chain."); return; } try { chainOfTrust = buildChainOfTrustMap(service.listChainOfTrust(selectedTSCertificate.getAlias())); } catch (CertificateManagerException ex) { LOG.error("Error while calling server to get certificate-chain: {}", ex.getMessage(), ex); } HelperUtil.execPFShowDialog("wgvDlgChainOfTrust"); }

Target:
public void viewChainOfTrust() { chainOfTrust = new HashMap<>(); selectedCertsChain = new ArrayList<>(); if (null == selectedTSCertificate) { HelperUtil.addMessageError(TRUST_STORE_MSG, "Please choose a certificate to view chain."); return; } try { chainOfTrust = buildChainOfTrustMap(service.listChainOfTrust(selectedTSCertificate.getAlias())); } catch (CertificateManagerException ex) { LOG.error("Error while calling server to get certificate chain: {}", ex.getMessage(), ex); } HelperUtil.execPFShowDialog("wgvDlgChainOfTrust"); }
Source:
public WatchPageObject unfollowImage(String wikiURL, String imageName) { getUrl( wikiURL + URLsContent.wikiDir + URLsContent.fileNS + imageName+ "?action=unwatch" ); return new WatchPageObject(driver); }

Target:
public WatchPageObject unfollowImage(String wikiURL, String imageName) { String url = URLsContent.buildUrl( wikiURL + URLsContent.wikiDir + URLsContent.fileNameSpace + imageName, URLsContent.unfollowParameter ); getUrl(url); return new WatchPageObject(driver); }
Source:
private void notifyRoutingTableChange(String clusterName) { long startTime = System.currentTimeMillis(); for (Map.Entry<RoutingTableChangeListener, ListenerContext> entry : _routingTableChangeListenerMap.entrySet()) { entry.getKey() .onRoutingTableChange(new RoutingTableSnapshot(_routingTableRef.get()), entry.getValue().getContext()); } logger.info("RoutingTableProvider callback [aka not helix time] for cluster {}, take ms.", clusterName, (System.currentTimeMillis() - startTime)); }

Target:
private void notifyRoutingTableChange(String clusterName) { long startTime = System.currentTimeMillis(); for (Map.Entry<RoutingTableChangeListener, ListenerContext> entry : _routingTableChangeListenerMap.entrySet()) { entry.getKey() .onRoutingTableChange(new RoutingTableSnapshot(_routingTableRef.get()), entry.getValue().getContext()); } logger.info("RoutingTableProvider user callback time for cluster {}, took ms.", clusterName, (System.currentTimeMillis() - startTime)); }
Source:
public void errorHandler_clientResetReported() { SyncUser user = createTestUser(); String url = "realm://objectserver.realm.io/default"; final SyncConfiguration config = configFactory.createSyncConfigurationBuilder(user , url) .errorHandler(new SyncSession.ErrorHandler() { @Override public void onError(SyncSession session, ObjectServerError error) { if (error.getErrorCode() != ErrorCode.CLIENT_RESET) { fail("Wrong error " + error.toString()); return; } final ClientResetRequiredError handler = (ClientResetRequiredError) error; String filePathFromError = handler.getOriginalFile().getAbsolutePath(); String filePathFromConfig = session.getConfiguration().getPath(); Log.e("H4XOR", ">>>>>>>>>>>>>>>>> filePathFromError : " + filePathFromError); Log.e("H4XOR", ">>>>>>>>>>>>>>>>> filePathFromConfig : " + filePathFromConfig); Log.e("H4XOR", ">>>>>>>>>>>>>>>>> handler.getBackupFile().exists() : " + handler.getBackupFile().exists()); Log.e("H4XOR", ">>>>>>>>>>>>>>>>> handler.getOriginalFile().exists() : " + handler.getOriginalFile().exists()); fail(">>>>>>>>>>>>>>> NEW COMMIT"); assertEquals(filePathFromError, filePathFromConfig); assertFalse(handler.getBackupFile().exists()); assertTrue(handler.getOriginalFile().exists()); looperThread.testComplete(); } }) .build(); Realm realm = Realm.getInstance(config); looperThread.addTestRealm(realm); SyncManager.simulateClientReset(SyncManager.getSession(config)); }

Target:
public void errorHandler_clientResetReported() { SyncUser user = createTestUser(); String url = "realm://objectserver.realm.io/default"; final SyncConfiguration config = configFactory.createSyncConfigurationBuilder(user, url) .errorHandler(new SyncSession.ErrorHandler() { @Override public void onError(SyncSession session, ObjectServerError error) { if (error.getErrorCode() != ErrorCode.CLIENT_RESET) { fail("Wrong error " + error.toString()); return; } final ClientResetRequiredError handler = (ClientResetRequiredError) error; String filePathFromError = handler.getOriginalFile().getAbsolutePath(); String filePathFromConfig = session.getConfiguration().getPath(); assertEquals(filePathFromError, filePathFromConfig); assertFalse(handler.getBackupFile().exists()); assertTrue(handler.getOriginalFile().exists()); looperThread.testComplete(); } }) .build(); Realm realm = Realm.getInstance(config); looperThread.addTestRealm(realm); SyncManager.simulateClientReset(SyncManager.getSession(config)); }
Source:
private static ArrayList<Integer> computeTargetWidths(double begin, double end, double tol) { if (notCustom(begin, end, tol)) { return targetWidths(); } if (begin == end) { return new ArrayList<Integer>((int) begin); } ArrayList<Integer> resolutions = new ArrayList<Integer>(); while (begin < end && begin < MAX_WIDTH) { resolutions.add((int) Math.round(begin)); begin *= 1 + (tol / 100) * 2; } int lastIndex = resolutions.size() - 1; if (resolutions.get(lastIndex) < end) { resolutions.add((int) end); } return resolutions; }

Target:
private static ArrayList<Integer> computeTargetWidths(double begin, double end, double tol) { if (notCustom(begin, end, tol)) { return new ArrayList<Integer>(Arrays.asList(SRCSET_TARGET_WIDTHS)); } ArrayList<Integer> resolutions = new ArrayList<Integer>(); if (begin == end) { resolutions.add((int) begin); return resolutions; } while (begin < end && begin < MAX_WIDTH) { resolutions.add((int) Math.round(begin)); begin *= 1 + (tol / 100) * 2; } int lastIndex = resolutions.size() - 1; if (resolutions.get(lastIndex) < end) { resolutions.add((int) end); } return resolutions; }
Source:
public void testBasicScenario() throws Exception { new MockServerClient(mockServer.getContainerIpAddress(), mockServer.getMappedPort(MockServerContainer.PORT)) .when(request("/hello")) .respond(response("Hello World!")); URLConnection urlConnection = new URL(mockServer.getEndpoint() + "/hello").openConnection(); @Cleanup BufferedReader reader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); String line = reader.readLine(); System.out.println(line); assertTrue("MockServer returns correct result", line.contains("Hello World!")); }

Target:
public void testBasicScenario() throws Exception { new MockServerClient(mockServer.getContainerIpAddress(), mockServer.getServerPort()) .when(request("/hello")) .respond(response("Hello World!")); URLConnection urlConnection = new URL(mockServer.getEndpoint() + "/hello").openConnection(); @Cleanup BufferedReader reader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); String line = reader.readLine(); System.out.println(line); assertTrue("MockServer returns correct result", line.contains("Hello World!")); }
Source:
public void startService() { super.startService(); if (controller == null) { controller = (ServoController) startPeer("arduino"); } if (jaw == null) { jaw = (ServoControl) startPeer("jaw"); jaw.setMinMax(10.0, 25.0); jaw.setRest(10.0); } if (eyeX == null) { eyeX = (ServoControl) startPeer("eyeX"); eyeX.setMinMax(60.0, 100.0); eyeX.setRest(80.0); } if (eyeY == null) { eyeY = (ServoControl) startPeer("eyeY"); eyeY.setMinMax(50.0, 100.0); eyeY.setRest(90.0); } if (rollNeck == null) { rollNeck = (ServoControl) startPeer("rollNeck"); rollNeck.setMinMax(20.0, 160.0); rollNeck.setRest(90.0); } if (neck == null) { neck = (ServoControl) startPeer("neck"); neck.setMinMax(20.0, 160.0); neck.setRest(90.0); } if (rothead == null) { rothead = (ServoControl) startPeer("rothead"); rothead.setMinMax(20.0, 160.0); rothead.setRest(90.0); } setVelocity(45.0, 45.0, null, null, null, 45.0); }

Target:
public void startService() { super.startService(); if (controller == null) { controller = (ServoController) startPeer("arduino"); } startPeer("jaw"); startPeer("eyeX"); startPeer("eyeY"); startPeer("rothead"); startPeer("neck"); startPeer("rollNeck"); if (jaw == null) { jaw = (ServoControl) startPeer("jaw"); jaw.setMinMax(10.0, 25.0); jaw.setRest(10.0); } if (eyeX == null) { eyeX = (ServoControl) startPeer("eyeX"); eyeX.setMinMax(60.0, 100.0); eyeX.setRest(80.0); } if (eyeY == null) { eyeY = (ServoControl) startPeer("eyeY"); eyeY.setMinMax(50.0, 100.0); eyeY.setRest(90.0); } if (rollNeck == null) { rollNeck = (ServoControl) startPeer("rollNeck"); rollNeck.setMinMax(20.0, 160.0); rollNeck.setRest(90.0); } if (neck == null) { neck = (ServoControl) startPeer("neck"); neck.setMinMax(20.0, 160.0); neck.setRest(90.0); } if (rothead == null) { rothead = (ServoControl) startPeer("rothead"); rothead.setMinMax(20.0, 160.0); rothead.setRest(90.0); } setVelocity(45.0, 45.0, null, null, null, 45.0); }
Source:
public CacheBasedDatasetBuilder(Ignite ignite, IgniteCache<K, V> upstreamCache, IgniteBiPredicate<K, V> filter) { this.ignite = ignite; this.upstreamCache = upstreamCache; this.filter = filter; this.transformers = new LinkedList<>(); this.transformerDataSuppliers = new LinkedList<>(); }

Target:
public CacheBasedDatasetBuilder(Ignite ignite, IgniteCache<K, V> upstreamCache, IgniteBiPredicate<K, V> filter) { this.ignite = ignite; this.upstreamCache = upstreamCache; this.filter = filter; transformersChain = UpstreamTransformerChain.empty(); }
Source:
private void scrollToElement_feedbackEditPage_scrolledCorrectly() { JavascriptExecutor javascriptExecutor = (JavascriptExecutor) browser.driver; assertFalse(feedbackEditPage.isElementInViewport("empty_message")); javascriptExecutor.executeScript("scrollToElement(document.getElementById('empty_message'), {duration: 800});"); ThreadHelper.waitFor(800); assertTrue(feedbackEditPage.isElementInViewport("empty_message")); }

Target:
private void scrollToElement_feedbackEditPage_scrolledCorrectly() { JavascriptExecutor javascriptExecutor = (JavascriptExecutor) browser.driver; String elementId = "empty_message"; assertFalse(feedbackEditPage.isElementInViewport(elementId)); String scrollToElementScript = "scrollToElement(document.getElementById(%s), {duration: 800});"; javascriptExecutor.executeScript(String.format(scrollToElementScript, "\'" + elementId + "\'")); ThreadHelper.waitFor(800); assertTrue(feedbackEditPage.isElementInViewport(elementId)); }
Source:
private void removeDataCenter() { getCompensationContext().snapshotEntity(getStoragePool()); getStoragePoolDAO().remove(getStoragePool().getId()); getCompensationContext().stateChanged(); }

Target:
private void removeDataCenter() { TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getCompensationContext().snapshotEntity(getStoragePool()); getStoragePoolDAO().remove(getStoragePool().getId()); getCompensationContext().stateChanged(); return null; } }); }
Source:
public List<Integer> getCurrentPositionOfSounds() { List<Integer> positionList = new ArrayList<>(); for (MediaPlayer mediaPlayer : mediaPlayers) { int position = mediaPlayer.isPlaying() ? mediaPlayer.getCurrentPosition() : mediaPlayer.getDuration(); positionList.add(position); } return positionList; }

Target:
private List<Integer> getCurrentPositionOfSounds() { List<Integer> positionList = new ArrayList<>(); for (MediaPlayer mediaPlayer : mediaPlayers) { positionList.add(mediaPlayer.getCurrentPosition()); } return positionList; }
Source:
private void listProfileFiles() { try (Stream<Path> files = Files.list(profilePath)) { files .filter(Files::isRegularFile) .filter(file -> file.toAbsolutePath().toString().endsWith(PROFILE_EXTENSION)) .forEach(profile -> console.println(FilenameUtils.removeExtension(profile.toString()))); } catch (IOException e) { printError("Error occurred when locating profiles"); LOGGER.error("An error occured when locating profiles", e); } }

Target:
private void listProfileFiles() { try (Stream<Path> files = Files.list(profilePath)) { files .filter(Files::isRegularFile) .filter(file -> file.toAbsolutePath().toString().endsWith(PROFILE_EXTENSION)) .forEach( profile -> console.println(FilenameUtils.removeExtension(profile.toFile().getName()))); } catch (IOException e) { printError("Error occurred when locating profiles"); LOGGER.error("An error occured when locating profiles", e); } }
Source:
public Issue editIssueState(IRepositoryIdProvider repository, int issueId, boolean isOpen) throws IOException { HttpURLConnection connection = createIssuePostConnection(repository, issueId); HashMap<Object, Object> data = new HashMap<>(); String state; if (isOpen) { state = STATE_OPEN; } else { state = STATE_CLOSED; } data.put(FILTER_STATE, state); return ghClient.sendJson(connection, data, Issue.class); }

Target:
public Issue editIssueState(IRepositoryIdProvider repository, int issueId, boolean isOpen) throws IOException { HttpURLConnection connection = createIssuePostConnection(repository, issueId); HashMap<Object, Object> data = new HashMap<>(); String state = isOpen ? STATE_OPEN : STATE_CLOSED; data.put(FILTER_STATE, state); return ghClient.sendJson(connection, data, Issue.class); }
Source:
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { logger.info("Performing complete notifications"); listener.getLogger().println("[INFO] Slack notifications will be sent to the following channels: " + String.join(", ", this.getRoom()) + " on " + this.getTeamDomain()); new ActiveNotifier((SlackNotifier) this, listener).completed(build); if (notifyRegression) { logger.info("Performing finalize notifications"); new ActiveNotifier((SlackNotifier) this, listener).finalized(build); } return true; }

Target:
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { logger.info("Performing complete notifications"); String teamDomain = this.getTeamDomain(); if (StringUtils.isEmpty(teamDomain)) { teamDomain = getDescriptor().getTeamDomain(); } if (StringUtils.isEmpty(teamDomain)) { teamDomain = ""; } else { teamDomain = " on Team Subdomain: " + teamDomain; } String room = this.getRoom(); if (StringUtils.isEmpty(room)) { room = getDescriptor().getRoom(); } if (StringUtils.isEmpty(room)) { listener.getLogger().println("[INFO] Slack notifications enabled in post-build but no Channel was found in the job or global config"); } else { listener.getLogger().println("[INFO] Slack notifications will be sent to the following channels: " + room + teamDomain); } new ActiveNotifier((SlackNotifier) this, listener).completed(build); if (notifyRegression) { logger.info("Performing finalize notifications"); new ActiveNotifier((SlackNotifier) this, listener).finalized(build); } return true; }
Source:
public void prepareTestData() { Configuration.browser = WebDriverRunner.CHROME; position = "30x60"; String[] coordinates = position.split("x"); int x = Integer.parseInt(coordinates[0]); int y = Integer.parseInt(coordinates[1]); point = new Point(x, y); }

Target:
public void prepareTestData() { position = "30x60"; String[] coordinates = position.split("x"); int x = Integer.parseInt(coordinates[0]); int y = Integer.parseInt(coordinates[1]); point = new Point(x, y); }
Source:
protected void patternImageChanged() { for (IPatternImageChangedListener listener : _listeners) { listener.patternImageChanged(getPatternImage()); } }

Target:
protected void patternImageChanged() { Image changedImage = getPatternImage(); for (IPatternImageChangedListener listener : _listeners) { listener.patternImageChanged(changedImage); } }
Source:
private final void init(byte r[], int rOff, int rLen, byte cf[], int cfOff, int cfLen, byte cq[], int cqOff, int cqLen, byte cv[], int cvOff, int cvLen, long ts, boolean del, boolean copy) { row = copyIfNeeded(r, rOff, rLen, copy); colFamily = copyIfNeeded(cf, cfOff, cfLen, copy); colQualifier = copyIfNeeded(cq, cqOff, cqLen, copy); colVisibility = copyIfNeeded(cv, cvOff, cvLen, copy); timestamp = ts; deleted = del; if (!sanityCheckKey()) { throw new IllegalArgumentException("Invalid Key entry. Key exceeds " + Integer.MAX_VALUE + " bytes."); } }

Target:
private final void init(byte r[], int rOff, int rLen, byte cf[], int cfOff, int cfLen, byte cq[], int cqOff, int cqLen, byte cv[], int cvOff, int cvLen, long ts, boolean del, boolean copy) { row = copyIfNeeded(r, rOff, rLen, copy); colFamily = copyIfNeeded(cf, cfOff, cfLen, copy); colQualifier = copyIfNeeded(cq, cqOff, cqLen, copy); colVisibility = copyIfNeeded(cv, cvOff, cvLen, copy); timestamp = ts; deleted = del; }