auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static VerifiableProperties buildFrontendVProps(File trustStoreFile) throws IOException, GeneralSecurityException { Properties properties = new Properties(); properties.put("rest.server.blob.storage.service.factory", "com.github.ambry.frontend.AmbryBlobStorageServiceFactory"); properties.put("rest.server.router.factory", "com.github.ambry.router.InMemoryRouterFactory"); properties.put("rest.server.account.service.factory", "com.github.ambry.account.InMemAccountServiceFactory"); properties.put("netty.server.port", Integer.toString(PLAINTEXT_SERVER_PORT)); properties.put("netty.server.ssl.port", Integer.toString(SSL_SERVER_PORT)); properties.put("netty.server.enable.ssl", "true"); properties.put("netty.server.request.buffer.watermark", "1"); properties.put("netty.multipart.post.max.size.bytes", Long.toString(MAX_MULTIPART_POST_SIZE_BYTES)); TestSSLUtils.addSSLProperties(properties, "", SSLFactory.Mode.SERVER, trustStoreFile, "frontend"); properties.put("kms.default.container.key", TestUtils.getRandomKey(32)); properties.setProperty("clustermap.cluster.name", "CLuster-Name"); properties.setProperty("clustermap.datacenter.name", "Datacenter-Name"); properties.setProperty("clustermap.host.name", "localhost"); return new VerifiableProperties(properties); }

Target:
private static VerifiableProperties buildFrontendVProps(File trustStoreFile) throws IOException, GeneralSecurityException { Properties properties = new Properties(); properties.put("rest.server.blob.storage.service.factory", "com.github.ambry.frontend.AmbryBlobStorageServiceFactory"); properties.put("rest.server.router.factory", "com.github.ambry.router.InMemoryRouterFactory"); properties.put("rest.server.account.service.factory", "com.github.ambry.account.InMemAccountServiceFactory"); properties.put("netty.server.port", Integer.toString(PLAINTEXT_SERVER_PORT)); properties.put("netty.server.ssl.port", Integer.toString(SSL_SERVER_PORT)); properties.put("netty.server.enable.ssl", "true"); properties.put("netty.server.request.buffer.watermark", "1"); properties.put("netty.multipart.post.max.size.bytes", Long.toString(MAX_MULTIPART_POST_SIZE_BYTES)); CommonTestUtils.populateRequiredRouterProps(properties); TestSSLUtils.addSSLProperties(properties, "", SSLFactory.Mode.SERVER, trustStoreFile, "frontend"); properties.put("kms.default.container.key", TestUtils.getRandomKey(32)); properties.setProperty("clustermap.cluster.name", "Cluster-Name"); properties.setProperty("clustermap.datacenter.name", DATA_CENTER_NAME); properties.setProperty("clustermap.host.name", HOST_NAME); return new VerifiableProperties(properties); }
Source:
private boolean isNicHealthy(NetworkInterface networkInterface) { try { return networkInterface.isUp(); } catch (SocketException e) { log.warn("Unable to get network interface '{}' status, pronouncing it unhealthy. Due to {}", networkInterface.getDisplayName(), e.getMessage()); log.debug("Exception", e); return false; } }

Target:
private boolean isNicHealthy(NetworkInterface networkInterface) { try { return networkInterface.isUp(); } catch (SocketException e) { log.warn("Unable to get network interface '{}' status, pronouncing it unhealthy: {}", networkInterface.getDisplayName(), e.getMessage()); log.debug("Exception", e); return false; } }
Source:
protected Serializable performSave( Object entity, Serializable id, EntityPersister persister, boolean useIdentityColumn, Object anything, EventSource source, boolean requiresImmediateIdAccess) { if ( LOG.isTraceEnabled() ) { LOG.tracev( "Saving {0}", MessageHelper.infoString( persister, id, source.getFactory() ) ); } final EntityKey key; if ( !useIdentityColumn ) { key = source.generateEntityKey( id, persister ); Object old = source.getPersistenceContext().getEntity( key ); if ( old != null ) { if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) { source.forceFlush( source.getPersistenceContext().getEntry( old ) ); } else { throw new NonUniqueObjectException( id, persister.getEntityName() ); } } if ( ! DelayedPostInsertIdentifier.class.isInstance( id ) ) { persister.setIdentifier( entity, id, source ); } } else { key = null; } if ( invokeSaveLifecycle( entity, persister, source ) ) { return id; } return performSaveOrReplicate( entity, key, persister, useIdentityColumn, anything, source, requiresImmediateIdAccess ); }

Target:
protected Serializable performSave( Object entity, Serializable id, EntityPersister persister, boolean useIdentityColumn, Object anything, EventSource source, boolean requiresImmediateIdAccess) { if ( LOG.isTraceEnabled() ) { LOG.tracev( "Saving {0}", MessageHelper.infoString( persister, id, source.getFactory() ) ); } final EntityKey key; if ( !useIdentityColumn ) { key = source.generateEntityKey( id, persister ); Object old = source.getPersistenceContext().getEntity( key ); if ( old != null ) { if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) { source.forceFlush( source.getPersistenceContext().getEntry( old ) ); } else { throw new NonUniqueObjectException( id, persister.getEntityName() ); } } persister.setIdentifier( entity, id, source ); } else { key = null; } if ( invokeSaveLifecycle( entity, persister, source ) ) { return id; } return performSaveOrReplicate( entity, key, persister, useIdentityColumn, anything, source, requiresImmediateIdAccess ); }
Source:
public void start() { CONFIG_FILE.addCallback(new Runnable() { @Override public void run() { loadDrivers(); } }); loadDrivers(); }

Target:
public void start() { CONFIG_FILE.addCallback(new Runnable() { @Override public void run() { loadDrivers(); } }); try { loadDrivers(); } catch (Exception e) { log.error("Failed to load drivers.", e); } }
Source:
private void generateNumberLinks() { BootstrapGwtNumberedPager.INSTANCE.styles().ensureInjected(); htmlPanel.clear(); if (getPageCount() > 1) { if (mFirstPage != null) { htmlPanel.add(mFirstPage); htmlPanel.add(firstBar); } htmlPanel.add(mPrevPage); for (int i = 1; i <= getPageCount(); i++) { LIElement li = Document.get().createLIElement(); Anchor anchor = new Anchor(); final int page = i; anchor.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { NumberedPager thePager = NumberedPager.this; thePager.setPageStart((page - 1) * thePager.getPageSize()); } }); anchor.getElement().appendChild(Document.get().createTextNode(Integer.toString(i))); if (this.getPage() == i - 1) { anchor.setStyleName(BootstrapGwtNumberedPager.INSTANCE.styles().selected()); anchor.setEnabled(false); } anchor.addStyleName(BootstrapGwtNumberedPager.INSTANCE.styles().spaceApart()); li.appendChild(anchor.getElement()); htmlPanel.add(anchor); } htmlPanel.add(mNextPage); if (mLastPage != null) { htmlPanel.add(lastBar); htmlPanel.add(mLastPage); } } }

Target:
private void generateNumberLinks() { htmlPanel.clear(); if (getPageCount() > 1) { if (mFirstPage != null) { htmlPanel.add(mFirstPage); htmlPanel.add(firstBar); } htmlPanel.add(mPrevPage); for (int i = 1; i <= getPageCount(); i++) { LIElement li = Document.get().createLIElement(); Anchor anchor = new Anchor(); final int page = i; anchor.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { NumberedPager thePager = NumberedPager.this; thePager.setPageStart((page - 1) * thePager.getPageSize()); } }); anchor.getElement().setInnerHTML(Integer.toString(i)); if (this.getPage() == i - 1) { anchor.setStyleName(BootstrapGwtNumberedPager.INSTANCE.styles().selected()); anchor.setEnabled(false); } anchor.addStyleName(BootstrapGwtNumberedPager.INSTANCE.styles().spaceApart()); li.appendChild(anchor.getElement()); htmlPanel.add(anchor); } htmlPanel.add(mNextPage); if (mLastPage != null) { htmlPanel.add(lastBar); htmlPanel.add(mLastPage); } } }
Source:
public int generateNewViewId() { for (;;) { final int result = sNextGeneratedId.get(); int newValue = result + 1; if (newValue > 0x00FFFFFF) newValue = 1; if (sNextGeneratedId.compareAndSet(result, newValue)) { return result; } } }

Target:
public int generateNewViewId() { while (true) { final int result = lastGeneratedId.get(); int newValue = result + 1; if (newValue > 0x00FFFFFF) newValue = 1; if (lastGeneratedId.compareAndSet(result, newValue)) { return result; } } }
Source:
public void cumulativeResultsToDataShouldWriteToTheCorrectStreamNotCauseCorruption() { int numPuts = 10; int port = server1.invoke(() -> { return createServerAndRegion(); }); server2.invoke(() -> { createServerAndRegion(); }); String hostname = server1.getHost().getHostName(); client.invoke(() -> { ClientCacheFactory ccf = new ClientCacheFactory(); ccf.addPoolServer(hostname, port); clientCacheRule.createClientCache(ccf); ClientCache clientCache = clientCacheRule.getClientCache(); Region region = clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(regionName); IntStream.range(0, numPuts).forEach(id -> region.put("key-" + id, new TestObject(id))); ArrayList results = (ArrayList) FunctionService.onRegion(region) .execute(new QueryWithoutTurningIntoListFunction(regionName, "select distinct r.id, r.name from /" + regionName + " r, /" + regionName + " t where t.id = r.id order by r.id")) .getResult(); SelectResults rs = (SelectResults) results.get(0); assertEquals(numPuts, rs.size()); }); }

Target:
public void cumulativeResultsToDataShouldWriteToTheCorrectStreamNotCauseCorruption() { int numPuts = 10; int port = server1.invoke(this::createServerAndRegion); server2.invoke((SerializableRunnableIF) this::createServerAndRegion); String hostname = server1.getHost().getHostName(); client.invoke(() -> { ClientCacheFactory ccf = new ClientCacheFactory(); ccf.addPoolServer(hostname, port); clientCacheRule.createClientCache(ccf); ClientCache clientCache = clientCacheRule.getClientCache(); Region region = clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(regionName); IntStream.range(0, numPuts).forEach(id -> region.put("key-" + id, new TestObject(id))); ArrayList results = (ArrayList) FunctionService.onRegion(region) .execute(new QueryWithoutTurningIntoListFunction(regionName, "select distinct r.id, r.name from /" + regionName + " r, /" + regionName + " t where t.id = r.id")) .getResult(); SelectResults rs = (SelectResults) results.get(0); assertThat(rs).size().isEqualTo(numPuts); }); }
Source:
public void test() throws Exception { TestCase tcin = new TestCase(tc.getConfig()); tcin.setFolder("Indexing/Partition-1/"); tcin.setName("showIndexes"); TestCaseResult result = tr.run(tcin); result = tr.run(tc); switch (result.state) { case EXPECTED_ERROR_GOT_DIFFERENT_ERROR: case EXPECTED_ERROR_GOT_FAILURE: case EXPECTED_ERROR_GOT_RESULT: case EXPECTED_RESULT_GOT_DIFFERENT_RESULT: case EXPECTED_RESULT_GOT_ERROR: case EXPECTED_RESULT_GOT_FAILURE: fail(result.state + " (" + result.time + " ms): " + result.testCase.getXQueryDisplayName() + " " + result.error); break; case EXPECTED_ERROR_GOT_SAME_ERROR: case EXPECTED_RESULT_GOT_SAME_RESULT: break; case NO_RESULT_FILE: fail(result.state + " (" + result.time + " ms): " + result.testCase.getXQueryDisplayName()); break; } }

Target:
public void test() throws Exception { TestCaseResult result = tr.run(tc); switch (result.state) { case EXPECTED_ERROR_GOT_DIFFERENT_ERROR: case EXPECTED_ERROR_GOT_FAILURE: case EXPECTED_ERROR_GOT_RESULT: case EXPECTED_RESULT_GOT_DIFFERENT_RESULT: case EXPECTED_RESULT_GOT_ERROR: case EXPECTED_RESULT_GOT_FAILURE: fail(result.state + " (" + result.time + " ms): " + result.testCase.getXQueryDisplayName() + " " + result.error); break; case EXPECTED_ERROR_GOT_SAME_ERROR: case EXPECTED_RESULT_GOT_SAME_RESULT: break; case NO_RESULT_FILE: fail(result.state + " (" + result.time + " ms): " + result.testCase.getXQueryDisplayName()); break; } }
Source:
public V get(K key) { V value = cache.get(key); if (value != null) { return value; } locker.computeIfAbsent(key, (k) -> { if (cache.get(key) == null) { cache.put(key, rdTable.get(key)); } return null; }); return cache.get(key); }

Target:
public V get(K key) { V value = cache.get(key); if (value == null) { ++missCount; value = atomicGet(key); } else { ++hitCount; } return value; }
Source:
public Enumeration<URL> findResources(String name) throws IOException { final Channel channel = channel(); if(channel == null || !channel.isRemoteClassLoadingAllowed()) return EMPTY_ENUMERATION; Vector<URLish> v = resourcesMap.get(name); if(v!=null) { Vector<URL> urls = toURLs(v); if(urls!=null) return urls.elements(); } long startTime = System.nanoTime(); ResourceFile[] images = proxy.getResources2(name); channel.resourceLoadingTime.addAndGet(System.nanoTime()-startTime); channel.resourceLoadingCount.incrementAndGet(); v = new Vector<URLish>(); for( ResourceFile image: images ) try { v.add(image.image.resolveURL(channel,name).get()); } catch (InterruptedException e) { throw (Error) new Error("Failed to load resources "+name, e); } catch (ExecutionException e) { throw (Error) new Error("Failed to load resources "+name, e); } resourcesMap.put(name,v); Vector<URL> resURLs = toURLs(v); if (resURLs == null) { throw new IOException("One of the URLish objects cannot be converted to URL"); } return resURLs.elements(); }

Target:
public Enumeration<URL> findResources(String name) throws IOException { final Channel channel = channel(); if(channel == null || !channel.isRemoteClassLoadingAllowed()) return EMPTY_ENUMERATION; Vector<URLish> v = resourcesMap.get(name); if(v!=null) { Vector<URL> urls = toURLs(v); if(urls!=null) return urls.elements(); } long startTime = System.nanoTime(); ResourceFile[] images = proxy.getResources2(name); channel.resourceLoadingTime.addAndGet(System.nanoTime()-startTime); channel.resourceLoadingCount.incrementAndGet(); v = new Vector<URLish>(); for( ResourceFile image: images ) try { v.add(image.image.resolveURL(channel,name).get()); } catch (InterruptedException e) { throw new Error("Failed to load resources "+name, e); } catch (ExecutionException e) { throw new Error("Failed to load resources "+name, e); } resourcesMap.put(name,v); Vector<URL> resURLs = toURLs(v); if (resURLs == null) { throw new IOException("One of the URLish objects cannot be converted to URL"); } return resURLs.elements(); }
Source:
public void actionPerformed(ActionEvent e) { WebViewBasedBrowserComponent browser = WebViewBasedBrowserComponentFactory.createBrowserComponent (false, WebViewBasedBrowserComponent.PopupStrategy.EXTERNAL_BROWSER); Component browserComponent = browser.getComponent(); dialog = new JDialog(UISupport.getMainFrame(), "Endpoint Explorer", false); dialog.getContentPane().add(browserComponent); dialog.setSize(860, 435); dialog.setMinimumSize(new Dimension(860, 435)); dialog.setLocationRelativeTo(null); dialog.setResizable(true); dialog.setVisible(true); dialog.setIconImage((UISupport.createImageIcon("/SoapUI-OS_16-16.png")).getImage()); dialog.getRootPane().registerKeyboardAction((event) -> close(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); UISupport.centerDialog(dialog, UISupport.getMainFrame()); UISupport.getMainFrame().setEnabled(false); dialog.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { UISupport.getMainFrame().setEnabled(true); dialog.setVisible(false); } }); String path = "/com/eviware/soapui/explorer/soapui-pro-api-endpoint-explorer-starter-page.html"; String resource = this.getClass().getResource(path).toString(); browser.navigate(resource); browser.getPagePropertyMapper().update("dontShow", !SoapUI.getSettings().getBoolean(SHOW_ENDPOINT_EXPLORER_ON_START, true)); browser.addJavaScriptEventHandler("closeCallback", this); browser.addJavaScriptEventHandler("inspectorCallback", new EndpointExplorerCallback()); }

Target:
public void actionPerformed(ActionEvent e) { WebViewBasedBrowserComponent browser = WebViewBasedBrowserComponentFactory.createBrowserComponent (false, WebViewBasedBrowserComponent.PopupStrategy.EXTERNAL_BROWSER); Component browserComponent = browser.getComponent(); dialog = new JDialog(UISupport.getMainFrame(), "Endpoint Explorer", false); dialog.getContentPane().add(browserComponent); dialog.setSize(860, 435); dialog.setMinimumSize(new Dimension(860, 435)); dialog.setLocationRelativeTo(null); dialog.setResizable(true); dialog.setVisible(true); dialog.setIconImage((UISupport.createImageIcon("/SoapUI-OS_16-16.png")).getImage()); dialog.getRootPane().registerKeyboardAction((event) -> close(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); UISupport.centerDialog(dialog, UISupport.getMainFrame()); UISupport.getMainFrame().setEnabled(false); dialog.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { UISupport.getMainFrame().setEnabled(true); dialog.setVisible(false); } }); String path = "/com/eviware/soapui/explorer/soapui-pro-api-endpoint-explorer-starter-page.html"; String resource = this.getClass().getResource(path).toString(); browser.navigate(resource); PagePropertyMapper pagePropertyMapper = browser.getPagePropertyMapper(); if (pagePropertyMapper != null) { pagePropertyMapper.update("dontShow", !SoapUI.getSettings().getBoolean(SHOW_ENDPOINT_EXPLORER_ON_START, true)); } browser.addJavaScriptEventHandler("closeCallback", this); browser.addJavaScriptEventHandler("inspectorCallback", new EndpointExplorerCallback()); }
Source:
public void run() { RunAsClassLoader.run(classLoader, () -> { try { runHooks(ProcessStep.Validating); for (Method m : onValidate) { if (m.getReturnType() == List.class) { addError((List<String>)m.invoke(handler)); } else if (m.getReturnType() == boolean.class) { if (!(boolean)m.invoke(handler)) addError("Validator " + m.getName() + " returned false"); } else { throw new RuntimeException("onValidate method " + m.getName() + " has wrong return type " + m.getReturnType()); } } if (errors.size() > 0) { runHooks(ProcessStep.Invalid); return; } else { runHooks(ProcessStep.Processing); for (Method m : onMessage) { m.invoke(handler, new Object[] {}); } } } catch (Throwable e) { log.info("Error processing", e); if (e.getCause() != null) addError(e.getCause().getMessage()); else addError(e.getMessage()); } if (errors.size() > 0) { getErrors().stream().forEach(e -> log.error(e)); try { for (Method m : onProcessStep.get(ProcessStep.Error)) { m.invoke(handler); } } catch (Throwable e) { log.error("Error in @On(ProcessStep.Error) handler.", e); } LifeCycleMonitors.call(ProcessStep.Error, this); } else { try { runHooks(ProcessStep.Complete); } catch (Throwable e) { log.error("Error in @On(ProcessStep.Complete) handler.", e); LifeCycleMonitors.call(ProcessStep.Error, this); } } try { msg.getJmsMsg().acknowledge(); } catch (JMSException e) { log.error("Error while acking message.", e); } }); }

Target:
public void run() { RunAsClassLoader.run(classLoader, () -> { runHooks(ProcessStep.Validating); LifeCycleMonitors.call(ProcessStep.Validating, this); for (Method m : onValidate) { if (m.getReturnType() == List.class) { addError(runLoggingErrors(() -> (List<String>)m.invoke(handler))); } else if (m.getReturnType() == boolean.class) { boolean valid = runLoggingErrors(() -> (boolean)m.invoke(handler)); if (!valid) addError("Validator " + m.getName() + " returned false"); } else { addError("onValidate method " + m.getName() + " has wrong return type " + m.getReturnType()); } } if (errors.size() > 0) { runHooks(ProcessStep.Invalid); LifeCycleMonitors.call(ProcessStep.Invalid, this); } else { runHooks(ProcessStep.Processing); LifeCycleMonitors.call(ProcessStep.Processing, this); for (Method m : onMessage) { runLoggingErrors(() -> m.invoke(handler)); } if (errors.size() > 0) { runHooks(ProcessStep.Error); LifeCycleMonitors.call(ProcessStep.Error, this); } else { runHooks(ProcessStep.Complete); LifeCycleMonitors.call(ProcessStep.Complete, this); } } getErrors().stream().forEach(e -> log.error(e)); try { msg.getJmsMsg().acknowledge(); } catch (JMSException e) { log.error("Error while acking message.", e); } }); }
Source:
public boolean isCompacted() { return compactedChain != null; }

Target:
public boolean isCompacted() { return compacted; }
Source:
public Response content(@PathParam("path") String path) { Response response; String mediaType = getMediaTypeFromPath(path); if (path.isEmpty() || path.equals("index.html")) { response = Response.ok().entity(getIndex()).type(mediaType).build(); } else { mediaType = getMediaTypeFromPath(path); if (path.endsWith("png") || path.endsWith("gif")) { byte[] content = FileUtils.readAllBytesFromResource(swaggerResource + path); if (content != null) { response = Response.ok().entity(content).type(mediaType).build(); } else { response = Response.status(Response.Status.NOT_FOUND).build(); } } else { String content = FileUtils.readAllTextFromResource(swaggerResource + path); if (content != null) { response = Response.ok().entity(content).type(mediaType).build(); } else { response = Response.status(Response.Status.NOT_FOUND).build(); } } } return response; }

Target:
public Response content(@PathParam("path") String path) { Response response; String mediaType = getMediaTypeFromPath(path); if (path.isEmpty() || path.equals("index.html")) { response = Response.ok().entity(getIndex()).type(mediaType).build(); } else { mediaType = getMediaTypeFromPath(path); if (path.endsWith("png") || path.endsWith("gif")) { byte[] content = FileUtils.readAllBytesFromResource(swaggerResource + path); if (content != null) { response = Response.ok().entity(content).type(mediaType).build(); } else { response = Response.status(Response.Status.NOT_FOUND).build(); } } else { String content = FileUtils.readAllTextFromResource(swaggerResource + path); if (StringUtils.isNotEmpty(content)) { response = Response.ok().entity(content).type(mediaType).build(); } else { response = Response.status(Response.Status.NOT_FOUND).build(); } } } return response; }
Source:
private void highlightSearchPattern() { if (searchHighlightPattern.isPresent()) { String pattern = searchHighlightPattern.get().pattern(); previewView.getEngine().executeScript( "var markInstance = new Mark(document.getElementById(\"content\"));" + "markInstance.unmark({" + " done: function(){" + " markInstance.markRegExp(/" + pattern.replaceAll("(?<!\\\\)/", "\\\\/") + "/gmi);" + " }" + " });" ); } else { previewView.getEngine().executeScript( "var markInstance = new Mark(document.getElementById(\"content\"));" + "markInstance.unmark()" ); } }

Target:
private void highlightSearchPattern() { String callbackForUnmark = ""; if (searchHighlightPattern.isPresent()) { String javaScriptRegex = createJavaScriptRegex(searchHighlightPattern.get()); callbackForUnmark = String.format(JS_MARK_REG_EXP_CALLBACK, javaScriptRegex); } String unmarkInstance = String.format(JS_UNMARK_WITH_CALLBACK, callbackForUnmark); previewView.getEngine().executeScript(unmarkInstance); }
Source:
private boolean hasPayload() { return getPayload().exists(); }

Target:
private boolean hasPayload() { return getPayloadDir().isDirectory(); }
Source:
private JfrInstrumentedByteBufAllocator(ByteBufAllocator wrapped) { this.wrapped = wrapped; }

Target:
private JfrInstrumentedByteBufAllocator(ByteBufAllocator wrapped) { this.wrapped = ObjectUtil.checkNotNull(wrapped, "wrapped");; }
Source:
private void populateHeadersMap() { Map<String, String> headersMap = getRequestHeadersMap(); ManagedArtifact instance = getManagedArtifactInstance(); Map<String, Boolean> artifactHeaders = instance.getRequestParameters().getParameters(); for (FileItem fileItem : fileItems) { if (fileItem.isFormField()) { String parameter = fileItem.getFieldName().trim(); if (artifactHeaders.containsKey(parameter)) { headersMap.put(parameter, fileItem.getString().trim()); } } else { headersMap.put(ManagedArtifact.ARTIFACT_FILE_NAME, isNotBlank(fileItem.getName().trim())); } } checkForRequiredParameters(headersMap); transferContext.setHeadersMap(headersMap); }

Target:
private void populateHeadersMap() { Map<String, String> headersMap = getRequestHeadersMap(); Map<String, Boolean> artifactParams = managedArtifactRequestParameters.getParameters(); for (FileItem fileItem : fileItems) { if (fileItem.isFormField()) { String parameter = fileItem.getFieldName().trim(); if (artifactParams.containsKey(parameter)) { headersMap.put(parameter, fileItem.getString().trim()); } } else { headersMap.put(ManagedArtifact.ARTIFACT_FILE_NAME, isNotBlank(fileItem.getName().trim())); } } checkForRequiredParameters(headersMap); transferContext.setHeadersMap(headersMap); }
Source:
private void editIssue(String key, Object value) throws IOException { root.retrieve().method("POST").with(key, value).method("PATCH").withUrlPath(getIssuesApiRoute()).to(); }

Target:
private void editIssue(String key, Object value) throws IOException { root.createRequest().with(key, value).method("PATCH").withUrlPath(getIssuesApiRoute()).send(); }
Source:
public boolean validateHostIsTrusted(VDS vds) { Set<String> hosts = new HashSet<String>(); hosts.add(vds.gethost_name()); List<AttestationValue> valueList = attestHosts(hosts); if (valueList.get(0).getTrustLevel() == AttestationResultEnum.TRUSTED) { return true; } else { return false; } }

Target:
public boolean validateHostIsTrusted(VDS vds) { List<String> hosts = new ArrayList<String>(); hosts.add(vds.gethost_name()); List<AttestationValue> valueList = attestHosts(hosts); return valueList.get(0).getTrustLevel() == AttestationResultEnum.TRUSTED; }
Source:
public Properties getProducerProperties(String outputChannelName) { if (isPartitionedProducer(outputChannelName)) { Properties channelProducerProperties = new Properties(); if (this.producerProperties != null) { channelProducerProperties.putAll(this.producerProperties); } channelProducerProperties.put(BinderProperties.MIN_PARTITION_COUNT, Integer.toString(getPartitionCount(outputChannelName))); channelProducerProperties.setProperty(BinderProperties.NEXT_MODULE_COUNT, Integer.toString(getPartitionCount(outputChannelName))); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_KEY_EXPRESSION); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_KEY_EXTRACTOR_CLASS); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_SELECTOR_CLASS); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_SELECTOR_EXPRESSION); return channelProducerProperties; } else { return this.producerProperties; } }

Target:
public Properties getProducerProperties(String outputChannelName) { if (isPartitionedProducer(outputChannelName)) { Properties channelProducerProperties = new Properties(); channelProducerProperties.putAll(this.producerProperties); channelProducerProperties.setProperty(BinderProperties.NEXT_MODULE_COUNT, Integer.toString(getPartitionCount(outputChannelName))); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_KEY_EXPRESSION); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_KEY_EXTRACTOR_CLASS); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_SELECTOR_CLASS); copyChannelBindingProperty(outputChannelName, channelProducerProperties, BinderProperties.PARTITION_SELECTOR_EXPRESSION); return channelProducerProperties; } else { return this.producerProperties; } }
Source:
protected Boolean doInBackground(Void... params) { final AccessibilityManager accessibility = (AccessibilityManager) context .getSystemService(Context.ACCESSIBILITY_SERVICE); if (!accessibility.isEnabled()) { return Boolean.FALSE; } final Intent screenReaderIntent = new Intent(SCREENREADER_INTENT_ACTION); screenReaderIntent.addCategory(SCREENREADER_INTENT_CATEGORY); final ContentResolver cr = context.getContentResolver(); final List<ResolveInfo> screenReaders = context.getPackageManager().queryIntentServices( screenReaderIntent, 0); boolean foundScreenReader = false; for (ResolveInfo screenReader : screenReaders) { final Cursor cursor = cr.query( Uri.parse("content://" + screenReader.serviceInfo.packageName + ".providers.StatusProvider"), null, null, null, null); if (cursor != null) { if (cursor.moveToFirst()) { final int status = cursor.getInt(0); cursor.close(); if (status == 1) { foundScreenReader = true; break; } } else { cursor.close(); } } } if (foundScreenReader) { mControlCodes = Pattern.compile(CONTROL_CODE_PATTERN); } return foundScreenReader; }

Target:
protected Boolean doInBackground(Void... params) { final AccessibilityManager accessibility = (AccessibilityManager) context .getSystemService(Context.ACCESSIBILITY_SERVICE); if (!accessibility.isEnabled()) { return Boolean.FALSE; } final Intent screenReaderIntent = new Intent(SCREENREADER_INTENT_ACTION); screenReaderIntent.addCategory(SCREENREADER_INTENT_CATEGORY); final ContentResolver cr = context.getContentResolver(); final List<ResolveInfo> screenReaders = context.getPackageManager().queryIntentServices( screenReaderIntent, 0); boolean foundScreenReader = false; for (ResolveInfo screenReader : screenReaders) { final Cursor cursor = cr.query( Uri.parse("content://" + screenReader.serviceInfo.packageName + ".providers.StatusProvider"), null, null, null, null); if (cursor != null) { try { cursor.moveToFirst(); final int status = cursor.getInt(0); if (status == 1) { foundScreenReader = true; break; } } finally { cursor.close(); } } } if (foundScreenReader) { mControlCodes = Pattern.compile(CONTROL_CODE_PATTERN); } return foundScreenReader; }
Source:
public MethodHandle find() { Field field; try { field = invocation.receiverClass().getDeclaredField(invocation.name()); } catch (NoSuchFieldException e) { return null; } if (invocation.arguments().length == 1) { return findMethodForGetter(field); } return findMethodForSetter(field); }

Target:
public MethodHandle find() { if (invocation.arity() == 1) { return findMethodForGetter(); } return findMethodForSetter(); }
Source:
public void setDimmer(Command command, String number) { if (command instanceof DecimalType) { int value = (int)((double)((DecimalType) command).intValue() * 2.54); HttpUtil.executeUrl(GET, createURL() + "/" + XML_PATH + "?" + SUFFIX_PASSWORD + getPassword() + "&" + SUFFIX_DIMMER + number + "=" + value, this.timeOut); } else { logger.error("Unsupported command type"); } }

Target:
public void setDimmer(Command command, String number) { if (command instanceof DecimalType) { int value = (int)((double)((DecimalType) command).intValue() * 2.54); String URL = createURL() + "/" + XML_PATH + "?" + SUFFIX_PASSWORD + getPassword() + "&" + SUFFIX_DIMMER + number + "=" + value; HttpUtil.executeUrl(GET, URL, this.timeOut); } else { logger.error("Unsupported command type"); } }
Source:
public Object execute() throws Exception { if( this.agents != null ) { for( AgentMessagingInterface agent : this.agents ) { try { agent.agentStatus(); } catch( Exception e ) { this.logger.warning( "An error occurred while giving agent status. " + e.getMessage()); Utils.logException( this.logger, e ); } } } return null; }

Target:
public Object execute() throws Exception { if( this.agents != null ) { for( AgentMessagingInterface agent : this.agents ) { try { System.out.println( agent.agentStatus() ); System.out.println( "" ); } catch( Exception e ) { this.logger.warning( "An error occurred while giving agent status. " + e.getMessage()); Utils.logException( this.logger, e ); } } } return null; }
Source:
private boolean upgradeTwoThree(SQLiteDatabase db) { return upgradeAppRecords(db) && upgradeProviderDb(db, ProviderUtils.ProviderType.TYPE_FORMS) && upgradeProviderDb(db, ProviderUtils.ProviderType.TYPE_INSTANCES); }

Target:
private boolean upgradeTwoThree(SQLiteDatabase db) { db.beginTransaction(); try { SqlStorage<Persistable> storage = new SqlStorage<Persistable>( ApplicationRecord.STORAGE_KEY, ApplicationRecordV1.class, new ConcreteDbHelper(c, db)); if (multipleInstalledAppRecords(storage)) { throw new MigrationException(true); } for (Persistable r : storage) { ApplicationRecordV1 oldRecord = (ApplicationRecordV1) r; ApplicationRecord newRecord = new ApplicationRecord(oldRecord.getApplicationId(), oldRecord.getStatus()); newRecord.setID(oldRecord.getID()); newRecord.setResourcesStatus(true); newRecord.setArchiveStatus(false); newRecord.setUniqueId(""); newRecord.setDisplayName(""); newRecord.setVersionNumber(-1); newRecord.setConvertedByDbUpgrader(true); newRecord.setPreMultipleAppsProfile(true); storage.write(newRecord); } if (upgradeProviderDb(db, ProviderUtils.ProviderType.FORMS) && upgradeProviderDb(db, ProviderUtils.ProviderType.INSTANCES)) { db.setTransactionSuccessful(); return true; } return false; } finally { db.endTransaction(); } }
Source:
protected Map<String, IndicatorValue> parseIndicatorData(String data) throws ActionException { if (data == null) { return null; } try { Map<String, Double> values = MAPPER.readValue(data, new TypeReference<Map<String, Double>>(){}); return values.entrySet().stream() .collect(Collectors .toMap( e -> e.getKey(), e -> new IndicatorValueFloat(e.getValue()))); } catch (IOException e) { throw new ActionParamsException("Invalid parameter value for key: " + StatisticsHelper.PARAM_SELECTORS + " - expected JSON object"); } }

Target:
protected Map<String, IndicatorValue> parseIndicatorData(String data) throws ActionException { try { Map<String, Double> values = MAPPER.readValue(data, new TypeReference<Map<String, Double>>(){}); return values.entrySet().stream() .collect(Collectors .toMap( e -> e.getKey(), e -> new IndicatorValueFloat(e.getValue()))); } catch (IOException e) { throw new ActionParamsException("Invalid parameter value for key: " + PARAM_DATA + " - expected JSON object"); } }
Source:
protected boolean isLeafMatch(Viewer viewer, Object element) { boolean result = false; IQuickOutlineLabelProvider labelProvider = (IQuickOutlineLabelProvider) ((StructuredViewer) viewer).getLabelProvider(); String labelText = labelProvider.getText(element); if (labelText != null) { result = wordMatches(labelText); } EObject eObj = (EObject) element; boolean match; for (EAttribute attribute : eObj.eClass().getEAllAttributes()) { if (attribute.getEAttributeType().getName().equals("EString") && eObj.eGet(attribute) != null) { match = wordMatches(eObj.eGet(attribute).toString()); if (match) { labelProvider.addMatch(eObj, attribute.getName()); } result = result || match; } } return result; }

Target:
protected boolean isLeafMatch(Viewer viewer, Object element) { boolean result = false; IQuickOutlineLabelProvider labelProvider = (IQuickOutlineLabelProvider) ((StructuredViewer) viewer).getLabelProvider(); String labelText = labelProvider.getText(element); if (labelText != null) { result = wordMatches(labelText); } EObject eObj = (EObject) element; boolean match; for (EAttribute attribute : eObj.eClass().getEAllAttributes()) { if (attribute.getEAttributeType() == EcorePackage.eINSTANCE.getEString() && eObj.eGet(attribute) != null) { match = wordMatches(eObj.eGet(attribute).toString()); if (match) { labelProvider.addMatch(eObj, attribute.getName()); } result = result || match; } } return result; }
Source:
public boolean exists() { boolean exists = super.exists(); if (!exists && getSession(false) != null) { URI resourceURI = getURI().trimFragment(); for (Resource resource : getSession(false).getAllSessionResources()) { if (resource.getURI().equals(resourceURI)) { exists = true; break; } } } return exists; }

Target:
public boolean exists() { boolean exists = super.exists(); if (!exists) { EObject input = getInput(false); if (input != null) { Resource resource = input.eResource(); if (resource != null) { exists = resource.getResourceSet().getURIConverter().exists(resource.getURI(), null); } } } return exists; }
Source:
public void run() { Firehose firehose = null; FirehoseV2 firehoseV2 = null; boolean normalExit = true; initPlumber(); try { Object metadata = plumber.startJob(); if (fireDepartment.checkFirehoseV2()) { firehoseV2 = initFirehoseV2(metadata); runFirehoseV2(firehoseV2); } else { firehose = initFirehose(); runFirehose(firehose); } } catch (RuntimeException e) { log.makeAlert( e, "[%s] aborted realtime processing[%s]", e.getClass().getSimpleName(), fireDepartment.getDataSchema().getDataSource() ).emit(); normalExit = false; throw Throwables.propagate(e); } catch (Error e) { log.makeAlert(e, "Error aborted realtime processing[%s]", fireDepartment.getDataSchema().getDataSource()) .emit(); normalExit = false; throw e; } finally { CloseQuietly.close(firehose); CloseQuietly.close(firehoseV2); if (normalExit) { plumber.finishJob(); } } }

Target:
public void run() { initPlumber(); try { final Closer closer = Closer.create(); try { Object metadata = plumber.startJob(); Firehose firehose; FirehoseV2 firehoseV2; final boolean success; if (fireDepartment.checkFirehoseV2()) { firehoseV2 = initFirehoseV2(metadata); closer.register(firehoseV2); success = runFirehoseV2(firehoseV2); } else { firehose = initFirehose(); closer.register(firehose); success = runFirehose(firehose); } if (success) { closer.register(() -> plumber.finishJob()); } } catch (InterruptedException e) { log.warn("Interrupted while running a firehose"); throw closer.rethrow(e); } catch (Exception e) { log.makeAlert( e, "[%s] aborted realtime processing[%s]", e.getClass().getSimpleName(), fireDepartment.getDataSchema().getDataSource() ).emit(); throw closer.rethrow(e); } catch (Error e) { log.makeAlert(e, "Error aborted realtime processing[%s]", fireDepartment.getDataSchema().getDataSource()) .emit(); throw closer.rethrow(e); } finally { closer.close(); } } catch (IOException e) { throw Throwables.propagate(e); } }
Source:
public void onLeft(LeftItem li) { DockerJobTemplateProperty jobTemplate = getJobTemplate(li); if (jobTemplate != null) { Cloud cloud = DockerCloud.getCloudByName(jobTemplate.getCloudname()); if ((cloud != null) && (cloud instanceof DockerCloud)) { ((DockerCloud) cloud).removeJobTemplate(li.getId()); } } }

Target:
public void onLeft(LeftItem li) { DockerJobTemplateProperty jobTemplate = getJobTemplate(li); if (jobTemplate != null) { Cloud cloud = DockerCloud.getCloudByName(jobTemplate.getCloudname()); if (cloud instanceof DockerCloud) { ((DockerCloud) cloud).removeJobTemplate(li.getId()); } } }
Source:
public TestFileUtilsImpl() { this.tempFolder = null; try { this.outputStream = getOutputFile(null); } catch (final IOException e) { LOG.error("unable to create ByteArrayOutputStream", e); e.printStackTrace(); } }

Target:
public TestFileUtilsImpl() { this.tempFolder = null; try { this.outputStream = getOutputFile(null); } catch (final IOException e) { LOG.error("unable to create ByteArrayOutputStream", e); } }
Source:
protected JMenu buildSketchMenu() { JMenuItem item; sketchMenu = new JMenu(_("Sketch")); item = newJMenuItem(_("Verify / Compile"), 'R'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleRun(false); } }); sketchMenu.add(item); item = newJMenuItem(_("Upload"), 'U'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleExport(false); } }); sketchMenu.add(item); item = newJMenuItemShift(_("Upload Using Programmer"), 'U'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleExport(true); } }); sketchMenu.add(item); item = newJMenuItemAlt("Export compiled Binary", 'S'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleRunAndSave(true); } }); sketchMenu.add(item); sketchMenu.addSeparator(); if (importMenu == null) { importMenu = new JMenu(_("Import Library...")); MenuScroller.setScrollerFor(importMenu); base.rebuildImportMenu(importMenu); } sketchMenu.add(importMenu); item = newJMenuItem(_("Show Sketch Folder"), 'K'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Base.openFolder(sketch.getFolder()); } }); sketchMenu.add(item); item.setEnabled(Base.openFolderAvailable()); item = new JMenuItem(_("Add File...")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { sketch.handleAddFile(); } }); sketchMenu.add(item); return sketchMenu; }

Target:
protected JMenu buildSketchMenu() { JMenuItem item; sketchMenu = new JMenu(_("Sketch")); item = newJMenuItem(_("Verify / Compile"), 'R'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleRun(false); } }); sketchMenu.add(item); item = newJMenuItem(_("Upload"), 'U'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleExport(false); } }); sketchMenu.add(item); item = newJMenuItemShift(_("Upload Using Programmer"), 'U'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleExport(true); } }); sketchMenu.add(item); item = newJMenuItemAlt(_("Export compiled Binary"), 'S'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleRunAndSave(true); } }); sketchMenu.add(item); sketchMenu.addSeparator(); if (importMenu == null) { importMenu = new JMenu(_("Import Library...")); MenuScroller.setScrollerFor(importMenu); base.rebuildImportMenu(importMenu); } sketchMenu.add(importMenu); item = newJMenuItem(_("Show Sketch Folder"), 'K'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Base.openFolder(sketch.getFolder()); } }); sketchMenu.add(item); item.setEnabled(Base.openFolderAvailable()); item = new JMenuItem(_("Add File...")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { sketch.handleAddFile(); } }); sketchMenu.add(item); return sketchMenu; }
Source:
public HttpResponseException buildHttpResponseException( String error, @Nullable String errorDescription, @Nullable String errorUri) throws IOException { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); JsonGenerator jsonGenerator = OAuth2Utils.JSON_FACTORY.createJsonGenerator( byteArrayOutputStream, Charset.defaultCharset()); jsonGenerator.writeStartObject(); jsonGenerator.writeFieldName("error"); jsonGenerator.writeString(error); if (errorDescription != null) { jsonGenerator.writeFieldName("error_description"); jsonGenerator.writeString(errorDescription); } if (errorUri != null) { jsonGenerator.writeFieldName("error_uri"); jsonGenerator.writeString(errorUri); } jsonGenerator.writeEndObject(); jsonGenerator.close(); return new HttpResponseException.Builder( 400, "statusMessage", new HttpHeaders()) .setContent(byteArrayOutputStream.toString()) .build(); }

Target:
public HttpResponseException buildHttpResponseException( String error, @Nullable String errorDescription, @Nullable String errorUri) throws IOException { GenericJson json = new GenericJson(); json.setFactory(OAuth2Utils.JSON_FACTORY); json.set("error", error); if (errorDescription != null) { json.set("error_description", errorDescription); } if (errorUri != null) { json.set("error_uri", errorUri); } return new HttpResponseException.Builder( 400, "statusMessage", new HttpHeaders()) .setContent(json.toPrettyString()) .build(); }
Source:
void poll(RequestRegistrationCallback<GetOperation> requestRegistrationCallback) { if (operationCompleted) { return; } if (firstChunk.isReady() || firstChunk.isInProgress()) { firstChunk.poll(requestRegistrationCallback); } if (firstChunk.isComplete()) { maybeWriteToChannel(); if (dataChunks != null) { for (GetChunk dataChunk : dataChunks) { if (dataChunk.isFree() && chunkIdIterator.hasNext()) { dataChunk.initialize(chunkIdIterator.nextIndex(), (BlobId) chunkIdIterator.next()); } if (dataChunk.isInProgress() || (dataChunk.isReady() && numChunksRetrieved - numChunksWrittenOut.get() < NonBlockingRouter.MAX_IN_MEM_CHUNKS)) { dataChunk.poll(requestRegistrationCallback); } } } } if (operationException.get() != null) { abort(operationException.get()); } }

Target:
void poll(RequestRegistrationCallback<GetOperation> requestRegistrationCallback) { if (operationCompleted) { return; } if (operationException.get() == null) { if (firstChunk.isReady() || firstChunk.isInProgress()) { firstChunk.poll(requestRegistrationCallback); } if (firstChunk.isComplete()) { if (getBlobResult != null) { getBlobResult.maybeWriteToChannel(); } if (dataChunks != null) { for (GetChunk dataChunk : dataChunks) { if (dataChunk.isFree() && chunkIdIterator.hasNext()) { dataChunk.initialize(chunkIdIterator.nextIndex(), (BlobId) chunkIdIterator.next()); } if (dataChunk.isInProgress() || (dataChunk.isReady() && numChunksRetrieved - getBlobResult.getNumChunksWrittenOut() < NonBlockingRouter.MAX_IN_MEM_CHUNKS)) { dataChunk.poll(requestRegistrationCallback); if (dataChunk.isComplete()) { onChunkOperationComplete(dataChunk); if (operationCompleted) { break; } } } } } } } if (operationException.get() != null) { abort(operationException.get()); } }
Source:
public ExternalBinary getReleaseForVersion(String version) throws Exception { String url = projectUrl + RELEASES_URL; int pageNumber = 1; List<String> availableVersions = new ArrayList<>(); while (true) { HttpClient.Response response = sentGetRequestWithPagination(url, pageNumber++, Collections.emptyMap()); JsonElement releases = gson.fromJson(response.getPayload(), JsonElement.class); if (releases != null && releases.isJsonArray() && releases.getAsJsonArray().size() > 0) { ExternalBinary releaseForVersion = getReleaseForVersion(version, releases.getAsJsonArray(), availableVersions); if (releaseForVersion != null) { return releaseForVersion; } } else { break; } } throw new IllegalArgumentException( "There wasn't found any release for the version: " + version + " in the repository: " + projectUrl + " Available versions are: " + availableVersions); }

Target:
public ExternalBinary getReleaseForVersion(String version) throws Exception { String url = projectUrl + RELEASES_URL; int pageNumber = 1; List<String> availableVersions = new ArrayList<>(); JsonElement releases = getReleasesJson(url, pageNumber); while (containsSubElements(releases)) { ExternalBinary releaseForVersion = getReleaseForVersion(version, releases.getAsJsonArray(), availableVersions); if (releaseForVersion != null) { return releaseForVersion; } releases = getReleasesJson(url, ++pageNumber); } throw new IllegalArgumentException( "No release matching version " + version + " has been found in the repository" + projectUrl + " Available versions are: " + availableVersions); }
Source:
public void doDestroy() { if (!destroyed.compareAndSet(false, true)) { return; } unregister(); AbstractRegistryFactory.destroyAll(); destroyProtocols(); }

Target:
public void doDestroy() { if (!destroyed.compareAndSet(false, true)) { return; } AbstractRegistryFactory.destroyAll(); destroyProtocols(); }
Source:
public void onMediaTransfer(Frame buffer) throws IOException { inbandDetector.detect(buffer.getData(), buffer.getDuration() / 1000000, 0); oobDetector.detect(buffer.getData(), buffer.getDuration() / 1000000, buffer.getSequenceNumber()); }

Target:
public void onMediaTransfer(Frame buffer) throws IOException { if (buffer.getLength() == 4) inbandDetector.detect(buffer.getData(), buffer.getDuration() / 1000000); else oobDetector.detect(buffer.getData(), buffer.getDuration() / 1000000); }
Source:
public ImmutableList<ProjectJson> getProjects() { return projects; }

Target:
public List<ProjectJson> getProjects() { return projects; }