auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void setAPIRelatedTags(TracingSpan tracingSpan, org.apache.synapse.MessageContext messageContext) { org.apache.axis2.context.MessageContext axis2MessageContext = ((Axis2MessageContext) messageContext).getAxis2MessageContext(); Object restUrlPostfix = axis2MessageContext.getProperty(APIMgtGatewayConstants.REST_URL_POSTFIX); Object httpMethod = axis2MessageContext.getProperty(Constants.Configuration.HTTP_METHOD); if (restUrlPostfix != null){ Util.setTag(tracingSpan,APIMgtGatewayConstants.SPAN_REQUEST_PATH, (String) restUrlPostfix); } if (httpMethod != null) { Util.setTag(tracingSpan, APIMgtGatewayConstants.SPAN_REQUEST_METHOD, (String) httpMethod); } Object electedResource = messageContext.getProperty(APIMgtGatewayConstants.API_ELECTED_RESOURCE); if (electedResource != null){ Util.setTag(tracingSpan, APIMgtGatewayConstants.SPAN_RESOURCE, (String) electedResource); } setTracingId(tracingSpan, axis2MessageContext); }

Target:
public static void setAPIRelatedTags(TracingSpan tracingSpan, org.apache.synapse.MessageContext messageContext) { org.apache.axis2.context.MessageContext axis2MessageContext = ((Axis2MessageContext) messageContext).getAxis2MessageContext(); Object restUrlPostfix = axis2MessageContext.getProperty(APIMgtGatewayConstants.REST_URL_POSTFIX); Object httpMethod = axis2MessageContext.getProperty(APIMgtGatewayConstants.HTTP_METHOD); if (restUrlPostfix != null) { Util.setTag(tracingSpan, APIMgtGatewayConstants.SPAN_REQUEST_PATH, (String) restUrlPostfix); } if (httpMethod != null) { Util.setTag(tracingSpan, APIMgtGatewayConstants.SPAN_REQUEST_METHOD, (String) httpMethod); } Object electedResource = messageContext.getProperty(APIMgtGatewayConstants.API_ELECTED_RESOURCE); if (electedResource != null) { Util.setTag(tracingSpan, APIMgtGatewayConstants.SPAN_RESOURCE, (String) electedResource); } setTracingId(tracingSpan, axis2MessageContext); }
Source:
public void testCount() { SWTBotNatTable nattable = bot.nattable(); int rowCount = nattable.rowCount(); int totalRowCount = nattable.preferredRowCount(); assertThat(rowCount, allOf(lessThan(totalRowCount), greaterThanOrEqualTo(14))); assertEquals("Two columns are visible", 2, nattable.columnCount()); assertEquals("Total thirty two rows are created", 32, totalRowCount); assertEquals("Total two columns are created", 2, nattable.preferredColumnCount()); }

Target:
public void testCount() { SWTBotNatTable nattable = bot.nattable(); int rowCount = nattable.rowCount(); int totalRowCount = nattable.preferredRowCount(); assertThat(rowCount, lessThanOrEqualTo(totalRowCount)); int columnCount = nattable.columnCount(); int totalColumnCount = nattable.preferredColumnCount(); assertThat(columnCount, lessThanOrEqualTo(totalColumnCount)); assertEquals("Total thirty two rows are created", 32, totalRowCount); assertEquals("Total two columns are created", 2, nattable.preferredColumnCount()); }
Source:
public List<Map<String, Object>> getIncompleteTasks() { final InputStream queryResponse = runGetQuery("incompleteTasks"); try { return jsonMapper.readValue( queryResponse, new TypeReference<List<Map<String, Object>>>() { } ); } catch (IOException e) { log.warn("Error parsing response for incompleteTasks query from Overlord [%s]", baseUrl()); return null; } }

Target:
public List<Map<String, Object>> getIncompleteTasks() { final InputStream queryResponse = runGetQuery(INCOMPLETE_TASKS); try { return jsonMapper.readValue( queryResponse, new TypeReference<List<Map<String, Object>>>() { } ); } catch (IOException e) { log.warn(e, "Error parsing response for incompleteTasks query from Overlord [%s]", baseUrl()); throw Throwables.propagate(e); } }
Source:
public static String getUserAgent() { String appString = getAppContext().getResources().getString(R.string.user_agent); String packageName = getAppContext().getPackageName(); PackageInfo pInfo = null; try { pInfo = getAppContext().getPackageManager().getPackageInfo(packageName, 0); } catch (PackageManager.NameNotFoundException e) { } String version = ""; if (pInfo != null) { version = "/" + pInfo.versionName; } String userAgent = appString + version; return userAgent; }

Target:
public static String getUserAgent() { String appString = getAppContext().getResources().getString(R.string.user_agent); String packageName = getAppContext().getPackageName(); String version = ""; PackageInfo pInfo = null; try { pInfo = getAppContext().getPackageManager().getPackageInfo(packageName, 0); if (pInfo != null) { version = "/" + pInfo.versionName; } } catch (PackageManager.NameNotFoundException e) { Log_OC.e(TAG, "Trying to get packageName", e.getCause()); } String userAgent = appString + version; return userAgent; }
Source:
public Map<String, DbParameterAccessor> getAllProcedureParameters( String procName) throws SQLException { String[] qualifiers = procName.split("\\."); String schemaName, procedureName; if (qualifiers.length == 2) { schemaName = qualifiers[0]; procedureName = qualifiers[1]; } else { schemaName = getConnection().getSchema(); procedureName = qualifiers[0]; } procedureName = procedureName.toUpperCase(); boolean isFunction; if (isProcedureOrFunction(schemaName, procedureName, false)) { isFunction = false; } else { if (isProcedureOrFunction(schemaName, procedureName, true)) { isFunction = true; } else { throw new SQLException("Cannot find Procedure or Function with name " + procName); } } return getParamMap(schemaName, procedureName, isFunction); }

Target:
public Map<String, DbParameterAccessor> getAllProcedureParameters(String procName) throws SQLException { DbObjectName qn = new DbObjectName(getConnection().getSchema(), procName.toUpperCase()); boolean isFunction; if (isProcedureOrFunction(qn, false)) { isFunction = false; } else if (isProcedureOrFunction(qn, true)) { isFunction = true; } else { throw new SQLException("Cannot find Procedure or Function with name " + procName); } return getParamMap(qn, isFunction); }
Source:
private double summarize(List<WeightedEntry> snapshot) { long totalWeight = snapshot.stream().map(WeightedEntry::weight).mapToLong(x -> x).sum(); if (totalWeight == 0) { return 0.0; } double valueSum = snapshot.stream() .map(entry -> entry.value() * entry.weight()) .mapToDouble(x -> x) .sum(); return valueSum / totalWeight; }

Target:
private double summarize(List<WeightedEntry> snapshot) { long totalWeight = snapshot.stream().mapToLong(WeightedEntry::weight).sum(); if (totalWeight == 0) { return 0.0; } double valueSum = snapshot.stream() .mapToDouble(entry -> entry.value() * entry.weight()) .sum(); return valueSum / totalWeight; }
Source:
public static boolean isJava6() { System.out.println(System.getProperty("java.version", "None??")); return System.getProperty("java.version", "").contains("1.6."); }

Target:
public static boolean isJava6() { return System.getProperty("java.version", "").contains("1.6."); }
Source:
public void switchToTrash() { hideTutorials(); if(currentView!=TRASHCAN){ TrashProjectListBox.getTrashProjectListBox().getTrashProjectList().getSelectedProjects().clear(); TrashProjectListBox.getTrashProjectListBox().getTrashProjectList().refreshTable(false); } currentView=TRASHCAN; projectListPane2.setWidth("100%"); projectListPanel.remove(ProjectListBox.getProjectListBox()); projectListPane2.add(TrashProjectListBox.getTrashProjectListBox()); pVertPanel.remove(projectListPanel); pVertPanel.add(projectListPane2); projectToolbar.setProjectTabButtonsVisible(false); projectToolbar.setPublishOrUpdateButtonVisible(false); projectToolbar.setTrashTabButtonsVisible(true); if (TrashProjectListBox.getTrashProjectListBox().getTrashProjectList().getNumProjects() == 0) { Ode.getInstance().createEmptyTrashDialog(true); } }

Target:
public void switchToTrash() { hideTutorials(); if (currentView != TRASHCAN){ TrashProjectListBox.getTrashProjectListBox().getTrashProjectList().getSelectedProjects().clear(); TrashProjectListBox.getTrashProjectListBox().getTrashProjectList().refreshTable(false); } currentView = TRASHCAN; projectListPane2.setWidth("100%"); projectListPanel.remove(ProjectListBox.getProjectListBox()); projectListPane2.add(TrashProjectListBox.getTrashProjectListBox()); pVertPanel.remove(projectListPanel); pVertPanel.add(projectListPane2); deckPanel.showWidget(projectsTabIndex); projectToolbar.setProjectTabButtonsVisible(false); projectToolbar.setPublishOrUpdateButtonVisible(false); projectToolbar.setTrashTabButtonsVisible(true); if (TrashProjectListBox.getTrashProjectListBox().getTrashProjectList().getNumProjects() == 0) { Ode.getInstance().createEmptyTrashDialog(true); } }
Source:
public ChangeDetail call() throws NoSuchChangeException, OrmException, EmailException, NoSuchEntityException, PatchSetInfoNotAvailableException, MissingObjectException, IncorrectObjectTypeException, IOException { final Change.Id changeId = patchSetId.getParentKey(); final ChangeControl control = changeControlFactory.validateFor(changeId); if (!control.canAddPatchSet()) { throw new NoSuchChangeException(changeId); } Change.Id cherryPickedChangeId = ChangeUtil.cherryPick(patchSetId, currentUser, message, destinationBranch, db, hooks, gitManager, patchSetInfoFactory, replication, myIdent); return changeDetailFactory.create(cherryPickedChangeId).call(); }

Target:
public ChangeDetail call() throws OrmException, EmailException, NoSuchEntityException, PatchSetInfoNotAvailableException, MissingObjectException, IncorrectObjectTypeException, IOException, InvalidChangeOperationException, NoSuchChangeException, MergeException { final Change.Id changeId = patchSetId.getParentKey(); final ChangeControl control = changeControlFactory.validateFor(changeId); if (!control.getProjectControl().controlForRef(destinationBranch).canUpload()) { throw new InvalidChangeOperationException( "Not allowed to cherry pick " + changeId.toString() + " to " + destinationBranch); } Change.Id cherryPickedChangeId = ChangeUtil.cherryPick(patchSetId, currentUser, message, destinationBranch, db, hooks, gitManager, patchSetInfoFactory, replication, myIdent); return changeDetailFactory.create(cherryPickedChangeId).call(); }
Source:
public void init() { if (JavaVersion.VERSION.getPlatform() != 8) throw new IllegalStateException(this + " not applicable for java " + JavaVersion.VERSION); try { alpnProtocols = SSLParameters.class.getMethod("setApplicationProtocols", String[].class); alpnProtocol = SSLEngine.class.getMethod("getApplicationProtocol"); return; } catch (NoSuchMethodException ignored) { } if (ALPN.class.getClassLoader() != null) throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath"); if (LOG.isDebugEnabled()) ALPN.debug = true; }

Target:
public void init() { if (JavaVersion.VERSION.getPlatform() != 8) throw new IllegalStateException(this + " not applicable for java " + JavaVersion.VERSION); try { alpnProtocols = SSLParameters.class.getMethod("setApplicationProtocols", String[].class); alpnProtocol = SSLEngine.class.getMethod("getApplicationProtocol"); if (LOG.isDebugEnabled()) LOG.debug("Using OpenJDK ALPN APIs instead of Jetty ALPN APIs"); return; } catch (NoSuchMethodException x) { LOG.ignore(x); } if (ALPN.class.getClassLoader() != null) throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath"); if (LOG.isDebugEnabled()) ALPN.debug = true; }
Source:
public static List<StreamReadsRequest> getReadRequests(final String readGroupSetId, String references) { final Iterable<Contig> contigs = Contig.parseContigsFromCommandLine(references); return FluentIterable.from(contigs) .transformAndConcat(new Function<Contig, Iterable<Contig>>() { @Override public Iterable<Contig> apply(Contig contig) { return contig.getShards(5000000L); } }) .transform(new Function<Contig, StreamReadsRequest>() { @Override public StreamReadsRequest apply(Contig shard) { return StreamReadsRequest.newBuilder() .setReadGroupSetId(readGroupSetId) .setStart(shard.start) .setEnd(shard.end) .setReferenceName(shard.referenceName) .build(); } }).toList(); }

Target:
public static List<StreamReadsRequest> getReadRequests(final String readGroupSetId, String references) { final Iterable<Contig> contigs = Contig.parseContigsFromCommandLine(references); return FluentIterable.from(contigs) .transformAndConcat(new Function<Contig, Iterable<Contig>>() { @Override public Iterable<Contig> apply(Contig contig) { return contig.getShards(SHARD_SIZE); } }) .transform(new Function<Contig, StreamReadsRequest>() { @Override public StreamReadsRequest apply(Contig shard) { return StreamReadsRequest.newBuilder() .setReadGroupSetId(readGroupSetId) .setStart(shard.start) .setEnd(shard.end) .setReferenceName(shard.referenceName) .build(); } }).toList(); }
Source:
private YailList getYailListPropertyHelper(Callable<YailList> propertyCallable) { try { return threadRunner .submit(propertyCallable) .get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } return new YailList(); }

Target:
private YailList getYailListPropertyHelper(Callable<YailList> propertyCallable) { try { return threadRunner .submit(propertyCallable) .get(); } catch (InterruptedException e) { Log.e(this.getClass().getName(), e.getMessage()); } catch (ExecutionException e) { Log.e(this.getClass().getName(), e.getMessage()); } return new YailList(); }
Source:
private static String getUserIdUrl(String encodedUsername) { String communityUrl = new UrlBuilder(Configuration.DEFAULT_LANGUAGE).getUrlForWiki("community"); return String.format("%s/api.php?action=query&list=users&ususers=%s&format=json&cb=%d", communityUrl, encodedUsername, DateTime.now().getMillis()); }

Target:
private static String getUserIdUrl(String encodedUsername) { String communityUrl = UrlBuilder.createUrlBuilderForWikiAndLang(COMMUNITY_WIKI, Configuration.DEFAULT_LANGUAGE).getUrl(); return String.format("%s/api.php?action=query&list=users&ususers=%s&format=json&cb=%d", communityUrl, encodedUsername, DateTime.now().getMillis()); }
Source:
public List<String> getPidsFromTarget(GwtXSRFToken xsrfToken, String pid, String targetRef) throws GwtKuraException { this.checkXSRFToken(xsrfToken); List<String> result = new ArrayList<>(); final BundleContext context = FrameworkUtil.getBundle(GwtWireGraphService.class).getBundleContext(); ServiceReference<ServiceComponentRuntime> scrServiceRef = context .getServiceReference(ServiceComponentRuntime.class); try { final ServiceComponentRuntime scrService = context.getService(scrServiceRef); final Set<String> referenceInterfaces = scrService.getComponentDescriptionDTOs().stream().map(component -> { ReferenceDTO[] references = component.references; for (ReferenceDTO reference : references) { if (targetRef.equals(reference.name)) { return reference.interfaceName; } } return null; }).filter(Objects::nonNull).collect(Collectors.toSet()); referenceInterfaces.forEach(reference -> { try { ServiceReference<?>[] serviceReferences = context.getServiceReferences(reference, null); if (isNull(serviceReferences)) { return; } for (ServiceReference<?> serviceReference : serviceReferences) { String cloudServicePid = (String) serviceReference.getProperty(KURA_SERVICE_PID); result.add(cloudServicePid); ServiceLocator.getInstance().ungetService(serviceReference); } } catch (InvalidSyntaxException e) { } }); } finally { context.ungetService(scrServiceRef); } return result; }

Target:
public List<String> getPidsFromTarget(GwtXSRFToken xsrfToken, String pid, String targetRef) throws GwtKuraException { this.checkXSRFToken(xsrfToken); List<String> result = new ArrayList<>(); final BundleContext context = FrameworkUtil.getBundle(GwtWireGraphService.class).getBundleContext(); ServiceReference<ServiceComponentRuntime> scrServiceRef = context .getServiceReference(ServiceComponentRuntime.class); try { final ServiceComponentRuntime scrService = context.getService(scrServiceRef); final Set<String> referenceInterfaces = scrService.getComponentDescriptionDTOs().stream() .filter(componentDescription -> scrService.getComponentConfigurationDTOs(componentDescription) .stream().anyMatch(componentConfiguration -> { String kuraServicePid = (String) componentConfiguration.properties .get(ConfigurationService.KURA_SERVICE_PID); return kuraServicePid != null && kuraServicePid.equals(pid); })) .map(componentDescription -> { ReferenceDTO[] references = componentDescription.references; for (ReferenceDTO reference : references) { if (targetRef.equals(reference.name)) { return reference.interfaceName; } } return null; }).filter(Objects::nonNull).collect(Collectors.toSet()); referenceInterfaces.forEach(reference -> { try { ServiceReference<?>[] serviceReferences = context.getServiceReferences(reference, null); if (isNull(serviceReferences)) { return; } Arrays.stream(serviceReferences).forEach(serviceReference -> { result.add((String) serviceReference.getProperty(KURA_SERVICE_PID)); ServiceLocator.getInstance().ungetService(serviceReference); }); } catch (InvalidSyntaxException e) { } }); } finally { context.ungetService(scrServiceRef); } return result; }
Source:
public void test1() throws Exception { File src = new File("src/org/zkoss/zktest/test2/ZK3848_lang_addon_Test1.xml"); File dst = new File("debug/classes/metainfo/zk/lang-addon.xml"); String name = "metainfo/zk/lang-addon.xml"; String elName = "addon-name"; String elDepends = "depends"; Path zkPath = dst.toPath().getParent(); if (!Files.exists(zkPath)) Files.createDirectories(zkPath); Files.copy(src.toPath(), dst.toPath(), StandardCopyOption.REPLACE_EXISTING); boolean throwError = false; try { clToTest.getDependentXMLResources(name, elName, elDepends); } catch (Exception ex) { Assert.assertEquals("In file:/Users/klyve/prj/zkmaster/zk/zktest/debug/classes/metainfo/zk/lang-addon.xml, you are extending component decimalbox which is defined in 'zkplus', 'zkbind', please define <depends>element", ex.getMessage()); throwError = true; } finally { Files.delete(dst.toPath()); Path metainfoPath = zkPath.getParent(); Files.delete(zkPath); Files.delete(metainfoPath); } if (!throwError) { throw new Exception(); } }

Target:
public void test1() throws Exception { File src = new File("src/org/zkoss/zktest/test2/ZK3848_lang_addon_Test1.xml"); File dst = new File("debug/classes/metainfo/zk/lang-addon.xml"); String name = "metainfo/zk/lang-addon.xml"; String elName = "addon-name"; String elDepends = "depends"; Path zkPath = dst.toPath().getParent(); if (!Files.exists(zkPath)) Files.createDirectories(zkPath); Files.copy(src.toPath(), dst.toPath(), StandardCopyOption.REPLACE_EXISTING); boolean throwError = false; try { clToTest.getDependentXMLResources(name, elName, elDepends); } catch (Exception ex) { Assert.assertThat(ex.getMessage(), containsString("you are extending component decimalbox which is defined in 'zkplus', 'zkbind', please define <depends> element")); throwError = true; } finally { Files.delete(dst.toPath()); Path metainfoPath = zkPath.getParent(); Files.delete(zkPath); Files.delete(metainfoPath); } if (!throwError) { throw new Exception("An exception is expected"); } }
Source:
public void doLastPhaseActions(FacesContext context, boolean outgoingResponseIsRedirect) { Map<Object, Object> contextMap = context.getAttributes(); PreviousNextFlashInfoManager flashManager = getCurrentFlashManager(contextMap, false); if (null == flashManager) { return; } if (this.isKeepMessages()) { this.saveAllMessages(context); } releaseCurrentFlashManager(contextMap); if (outgoingResponseIsRedirect) { FlashInfo previousRequestFlashInfo = flashManager.getPreviousRequestFlashInfo(); previousRequestFlashInfo.setIsRedirect(true); flashManager.expireNext_MovePreviousToNext(); } else { FlashInfo flashInfo = flashManager.getPreviousRequestFlashInfo(); if (null != flashInfo && flashInfo.getLifetimeMarker() == LifetimeMarker.SecondTimeThru) { flashManager.expirePrevious(); } } if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, "---------------------------------------"); } setCookie(context, flashManager, flashManager.encode(), false); System.out.println(flashManager.innerMap.size()); }

Target:
public void doLastPhaseActions(FacesContext context, boolean outgoingResponseIsRedirect) { Map<Object, Object> contextMap = context.getAttributes(); PreviousNextFlashInfoManager flashManager = getCurrentFlashManager(contextMap, false); if (null == flashManager) { return; } if (this.isKeepMessages()) { this.saveAllMessages(context); } releaseCurrentFlashManager(contextMap); if (outgoingResponseIsRedirect) { FlashInfo previousRequestFlashInfo = flashManager.getPreviousRequestFlashInfo(); previousRequestFlashInfo.setIsRedirect(true); flashManager.expireNext_MovePreviousToNext(); } else { FlashInfo flashInfo = flashManager.getPreviousRequestFlashInfo(); if (null != flashInfo && flashInfo.getLifetimeMarker() == LifetimeMarker.SecondTimeThru) { flashManager.expirePrevious(); } } if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, "---------------------------------------"); } setCookie(context, flashManager, flashManager.encode(), false); }
Source:
public String[] deployBPMNPackage(String filePath, String fileName) throws Exception{ String url = preURL+"repository/deployments"; HttpHost target = new HttpHost("localhost",port,"http"); CredentialsProvider credProvider = new BasicCredentialsProvider(); DefaultHttpClient httpClient = new DefaultHttpClient(); httpClient.getCredentialsProvider().setCredentials( new AuthScope(target.getHostName(),target.getPort()), new UsernamePasswordCredentials(username,password) ); try { HttpPost httpPost = new HttpPost(url); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.addBinaryBody("file", new File(filePath), ContentType.MULTIPART_FORM_DATA,fileName); HttpEntity multipart = builder.build(); httpPost.setEntity(multipart); HttpResponse response = httpClient.execute(httpPost); try { String status = response.getStatusLine().toString(); String responseData = EntityUtils.toString(response.getEntity()); JSONObject jsonResponseObject = new JSONObject(responseData); if (status.contains("201") || status.contains("200")) { String deploymentID = jsonResponseObject.getString("id"); String name = jsonResponseObject.getString("name"); return new String[] { status, deploymentID, name }; } if(status.contains("500")){ String errorMessage = jsonResponseObject.getString("errorMessage"); return new String {status,errorMessage}; } return new String[] { status, null, null }; } catch (Exception message) { log.error("Response Data", message); } } catch (Exception message) { log.error("Data Post Failure", message); } return new String[] { null, null, null }; }

Target:
public String[] deployBPMNPackage(String filePath, String fileName) throws Exception { String url = serviceURL + "repository/deployments"; HttpHost target = new HttpHost(hostname, port, "http"); DefaultHttpClient httpClient = new DefaultHttpClient(); httpClient.getCredentialsProvider().setCredentials( new AuthScope(target.getHostName(), target.getPort()), new UsernamePasswordCredentials(username, password) ); HttpPost httpPost = new HttpPost(url); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.addBinaryBody("file", new File(filePath), ContentType.MULTIPART_FORM_DATA, fileName); HttpEntity multipart = builder.build(); httpPost.setEntity(multipart); HttpResponse response = httpClient.execute(httpPost); String status = response.getStatusLine().toString(); String responseData = EntityUtils.toString(response.getEntity()); JSONObject jsonResponseObject = new JSONObject(responseData); if (status.contains(Integer.toString(HttpStatus.SC_CREATED)) || status.contains(Integer.toString(HttpStatus.SC_OK))) { String deploymentID = jsonResponseObject.getString("id"); String name = jsonResponseObject.getString("name"); return new String[]{status, deploymentID, name}; } else if (status.contains(Integer.toString(HttpStatus.SC_INTERNAL_SERVER_ERROR))) { String errorMessage = jsonResponseObject.getString("errorMessage"); throw new RestClientException(errorMessage); } else { throw new RestClientException("Failed to deploy package " + fileName); } }
Source:
private CounterConfiguration createCounterConfiguration(String json) throws IOException { JsonNode jsonNode = invocationHelper.getMapper().readValue(json, JsonNode.class); boolean strongCounter = jsonNode.has("strong-counter"); boolean weakCounter = jsonNode.has("weak-counter"); GlobalConfiguration cacheManagerConfiguration = invocationHelper.getRestCacheManager().getInstance().getCacheManagerConfiguration(); GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder(); GlobalConfigurationBuilder globalConfigurationBuilder = builder.read(cacheManagerConfiguration); CounterManagerConfigurationBuilder topBuilder = new CounterManagerConfigurationBuilder(globalConfigurationBuilder); if (strongCounter) { StrongCounterConfigurationBuilder counterBuilder = new StrongCounterConfigurationBuilder(topBuilder); invocationHelper.getJsonReader().readJson(counterBuilder, json); return ConvertUtil.parsedConfigToConfig(counterBuilder.create()); } else if (weakCounter) { WeakCounterConfigurationBuilder counterBuilder = new WeakCounterConfigurationBuilder(topBuilder); invocationHelper.getJsonReader().readJson(counterBuilder, json); return ConvertUtil.parsedConfigToConfig(counterBuilder.create()); } return null; }

Target:
private CounterConfiguration createCounterConfiguration(String json) throws IOException { JsonNode jsonNode = invocationHelper.getMapper().readValue(json, JsonNode.class); boolean strongCounter = jsonNode.has("strong-counter"); boolean weakCounter = jsonNode.has("weak-counter"); if (strongCounter) { StrongCounterConfigurationBuilder counterBuilder = new StrongCounterConfigurationBuilder(null); invocationHelper.getJsonReader().readJson(counterBuilder, json); return ConvertUtil.parsedConfigToConfig(counterBuilder.create()); } else if (weakCounter) { WeakCounterConfigurationBuilder counterBuilder = new WeakCounterConfigurationBuilder(null); invocationHelper.getJsonReader().readJson(counterBuilder, json); return ConvertUtil.parsedConfigToConfig(counterBuilder.create()); } return null; }
Source:
private Collection<T> getFilteredChildren() { if (fFilteredChildren == null) { fFilteredChildren = new ConcurrentLinkedQueue<T>(getChildren()); } return fFilteredChildren; }

Target:
private Collection<T> getFilteredChildren() { if (fFilteredChildren == null) { synchronized (fChildrenLock) { if (fFilteredChildren == null) { fFilteredChildren = Collections.unmodifiableCollection(getChildren()); } } } return fFilteredChildren; }
Source:
private static MethodHandle unmapJava7Or8(MethodHandles.Lookup lookup) throws ReflectiveOperationException { Class<?> directBufferClass = Class.forName("java.nio.DirectByteBuffer"); Method m = directBufferClass.getMethod("cleaner"); m.setAccessible(true); MethodHandle directBufferCleanerMethod = lookup.unreflect(m); Class<?> cleanerClass = directBufferCleanerMethod.type().returnType(); MethodHandle cleanMethod = lookup.findVirtual(cleanerClass, "clean", MethodType.methodType(void.class)); MethodHandle nonNullTest = lookup.findStatic(ByteBufferUtils.class, "nonNull", MethodType.methodType(boolean.class, Object.class) ).asType(MethodType.methodType(boolean.class, cleanerClass)); MethodHandle noop = MethodHandles.dropArguments(MethodHandles.constant( Void.class, null ).asType(MethodType.methodType(void.class)), 0, cleanerClass); MethodHandle unmapper = MethodHandles.filterReturnValue( directBufferCleanerMethod, MethodHandles.guardWithTest(nonNullTest, cleanMethod, noop) ).asType(MethodType.methodType(void.class, ByteBuffer.class)); return unmapper; }

Target:
private static MethodHandle unmapJava7Or8(MethodHandles.Lookup lookup) throws ReflectiveOperationException { Class<?> directBufferClass = Class.forName("java.nio.DirectByteBuffer"); Method m = directBufferClass.getMethod("cleaner"); m.setAccessible(true); MethodHandle directBufferCleanerMethod = lookup.unreflect(m); Class<?> cleanerClass = directBufferCleanerMethod.type().returnType(); MethodHandle cleanMethod = lookup.findVirtual(cleanerClass, "clean", MethodType.methodType(void.class)); MethodHandle nonNullTest = lookup.findStatic(Objects.class, "nonNull", MethodType.methodType(boolean.class, Object.class) ).asType(MethodType.methodType(boolean.class, cleanerClass)); MethodHandle noop = MethodHandles.dropArguments(MethodHandles.constant( Void.class, null ).asType(MethodType.methodType(void.class)), 0, cleanerClass); MethodHandle unmapper = MethodHandles.filterReturnValue( directBufferCleanerMethod, MethodHandles.guardWithTest(nonNullTest, cleanMethod, noop) ).asType(MethodType.methodType(void.class, ByteBuffer.class)); return unmapper; }
Source:
public AssertionError failure(String message) { return prettyPrintedWithoutAssertJRelatedElementsFromStackTraceIfNeeded(new AssertionError(message)); }

Target:
public AssertionError failure(String message) { return prettyPrintedWithoutAssertJRelatedElementsFromStackTraceIfNeeded(assertionErrorCreator.assertionError(message)); }
Source:
private GoogleClientSecrets loadClientSecretFromJson() throws IOException { try (InputStream in = new FileInputStream(new File(TestProperties.TEST_GMAIL_API_FOLDER, "client_secret.json"))) { return GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in)); } catch (FileNotFoundException e) { throw new RuntimeException("You need to set up your Gmail API credentials." + Const.EOL + "See docs/development.md section \"Deploying to a staging server\".", e); } }

Target:
private GoogleClientSecrets loadClientSecretFromJson() throws IOException { try (InputStreamReader in = new InputStreamReader(new FileInputStream( new File(TestProperties.TEST_GMAIL_API_FOLDER, "client_secret.json")))) { return GoogleClientSecrets.load(JSON_FACTORY, in); } catch (FileNotFoundException e) { throw new RuntimeException("You need to set up your Gmail API credentials." + Const.EOL + "See docs/development.md section \"Deploying to a staging server\".", e); } }
Source:
private static boolean isUnknownSymbol(PythonFile pythonFile, Map<String, Symbol> symbolsByName, StringLiteral stringLiteral) { if (stringLiteral.stringElements().stream().anyMatch(StringElement::isInterpolated)) { return false; } return !symbolsByName.containsKey(stringLiteral.trimmedQuotesValue()) && !BuiltinSymbols.all().contains(stringLiteral.trimmedQuotesValue()) && !isInitFileExportingModule(pythonFile, stringLiteral.trimmedQuotesValue()); }

Target:
private static boolean isUnknownSymbol(PythonFile pythonFile, Map<String, Symbol> symbolsByName, StringLiteral stringLiteral) { String name = stringLiteral.trimmedQuotesValue(); return stringLiteral.stringElements().stream().noneMatch(StringElement::isInterpolated) && !symbolsByName.containsKey(name) && !BuiltinSymbols.all().contains(name) && !isInitFileExportingModule(pythonFile, name); }
Source:
private void fetchChildren(List<OCFile> files) { int i; for (i=0; i < files.size() && !mCancellation; i++) { OCFile newFile = files.get(i); if (newFile.isDirectory()) { fetchData(newFile.getRemotePath(), newFile.getFileId()); FileDataStorageManager storageManager = new FileDataStorageManager(getAccount(), getContext().getContentResolver()); storageManager.saveFolderSize(newFile.getFileId()); } } if (mCancellation && i <files.size()) Log_OC.d(TAG, "Leaving synchronization before synchronizing " + files.get(i).getRemotePath() + " because cancelation request"); }

Target:
private void fetchChildren(List<OCFile> files) { int i; for (i=0; i < files.size() && !mCancellation; i++) { OCFile newFile = files.get(i); if (newFile.isDirectory()) { fetchData(newFile.getRemotePath(), newFile.getFileId()); getStorageManager().calculateFolderSize(newFile.getFileId()); } } if (mCancellation && i <files.size()) Log_OC.d(TAG, "Leaving synchronization before synchronizing " + files.get(i).getRemotePath() + " because cancelation request"); }
Source:
public QueryPlan explainAndPrepare(LensSessionHandle sessionHandle, String query, LensConf lensConf, String queryName) throws LensException { try { LOG.info("ExlainAndPrepare: " + sessionHandle.toString() + " query: " + query); acquire(sessionHandle); PreparedQueryContext prepared = prepareQuery(sessionHandle, query, lensConf, SubmitOp.EXPLAIN_AND_PREPARE); prepared.setQueryName(queryName); QueryPlan plan = prepared.getSelectedDriver().explainAndPrepare(prepared).toQueryPlan(); plan.setPrepareHandle(prepared.getPrepareHandle()); return plan; } catch (LensException e) { QueryPlan plan; if (e.getCause().getMessage() != null) plan = new QueryPlan(true, e.getCause().getMessage()); else plan = new QueryPlan(true, e.getMessage()); return plan; } catch (UnsupportedEncodingException e) { throw new LensException(e); } finally { release(sessionHandle); } }

Target:
public QueryPlan explainAndPrepare(LensSessionHandle sessionHandle, String query, LensConf lensConf, String queryName) throws LensException { try { LOG.info("ExlainAndPrepare: " + sessionHandle.toString() + " query: " + query); acquire(sessionHandle); PreparedQueryContext prepared = prepareQuery(sessionHandle, query, lensConf, SubmitOp.EXPLAIN_AND_PREPARE); prepared.setQueryName(queryName); QueryPlan plan = prepared.getSelectedDriver().explainAndPrepare(prepared).toQueryPlan(); plan.setPrepareHandle(prepared.getPrepareHandle()); return plan; } catch (LensException e) { LOG.info("Explain and prepare failed", e); QueryPlan plan; if (e.getCause() != null && e.getCause().getMessage() != null) { plan = new QueryPlan(true, e.getCause().getMessage()); } else { plan = new QueryPlan(true, e.getMessage()); } return plan; } catch (UnsupportedEncodingException e) { throw new LensException(e); } finally { release(sessionHandle); } }
Source:
public boolean intersects( Envelope other ) { if ( isValid() && other.isValid() && getDimension() == other.getDimension() ) { boolean result = true; for ( int i = 0; i < min.length; i++ ) { result = result && other.min[i] <= max[i] && other.max[i] >= min[i]; } return result; } else { return false; } }

Target:
public boolean intersects( Envelope other ) { boolean intersects = getDimension() == other.getDimension(); for ( int i = 0; i < min.length && intersects; i++ ) { intersects = other.min[i] <= max[i] && other.max[i] >= min[i]; } return intersects; }
Source:
public synchronized @NonNull HTNode readNode(int seqNumber) throws ClosedChannelException { int offset = seqNumber & CACHE_MASK; HTNode readNode = fNodeCache[offset]; if (readNode != null && readNode.getSequenceNumber() == seqNumber) { return readNode; } try { seekFCToNodePos(fFileChannelIn, seqNumber); readNode = HTNode.readNode(fConfig, fFileChannelIn); fNodeCache[offset] = readNode; return readNode; } catch (ClosedChannelException e) { throw e; } catch (IOException e) { Activator.getDefault().logError(e.getMessage(), e); throw new IllegalStateException(e); } }

Target:
public synchronized @NonNull HTNode readNode(int seqNumber) throws ClosedChannelException { int offset = seqNumber & CACHE_MASK; HTNode readNode = fNodeCache[offset]; if (readNode != null && readNode.getSequenceNumber() == seqNumber) { return readNode; } try { seekFCToNodePos(fFileChannelIn, seqNumber); readNode = HTNode.readNode(fConfig, fFileChannelIn); fNodeCache[offset] = readNode; return readNode; } catch (ClosedChannelException e) { throw e; } catch (IOException e) { Activator.getDefault().logError(e.getMessage(), e); throw new IllegalStateException(); } }
Source:
private void initializeAnimator() { final long singleButtonDuration = NoteLength.QUARTER.toMilliseconds(beatsPerMinute); final int singleButtonWidth = scrollingView.getMeasuredWidth() / NUMBER_OF_NOTES_IN_TRACK_VIEW; final int buttonsInTrack = scrollingView.getTrackGrid().getTactCount() * 4; scrollingAnimator = ObjectAnimator.ofInt(this, "globalPlayPosition", singleButtonWidth * buttonsInTrack); scrollingAnimator.setDuration(singleButtonDuration * buttonsInTrack); scrollingAnimator.setInterpolator(new LinearInterpolator()); scrollingAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { playButton.setImageResource(R.drawable.ic_stop_24dp); playLine.setVisibility(View.VISIBLE); scrollingView.setPlaying(true); scrollingView.smoothScrollToPosition(0); scrollingView.getTrackGrid().startPlayback(pianoView); } @Override public void onAnimationEnd(Animator animation) { playButton.setImageResource(R.drawable.ic_play); playLine.setVisibility(View.GONE); scrollingView.setPlaying(false); scrollingView.getTrackGrid().stopPlayback(pianoView); scrollingView.smoothScrollToPosition(0); } }); }

Target:
private void initializeAnimator() { final long singleButtonDuration = NoteLength.QUARTER.toMilliseconds(beatsPerMinute); final int singleButtonWidth = scrollingView.getMeasuredWidth() / NUMBER_OF_NOTES_IN_TRACK_VIEW; final int buttonsInTrack = scrollingView.getTrackGrid().getTactCount() * TrackRowView.QUARTER_COUNT; scrollingAnimator = ObjectAnimator.ofInt(this, "globalPlayPosition", singleButtonWidth * buttonsInTrack); scrollingAnimator.setDuration(singleButtonDuration * buttonsInTrack); scrollingAnimator.setInterpolator(new LinearInterpolator()); scrollingAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { playButton.setImageResource(R.drawable.ic_stop_24dp); playLine.setVisibility(View.VISIBLE); scrollingView.setPlaying(true); scrollingView.smoothScrollToPosition(0); scrollingView.getTrackGrid().startPlayback(pianoView); } @Override public void onAnimationEnd(Animator animation) { playButton.setImageResource(R.drawable.ic_play); playLine.setVisibility(View.GONE); scrollingView.setPlaying(false); scrollingView.getTrackGrid().stopPlayback(pianoView); scrollingView.smoothScrollToPosition(0); } }); }
Source:
public void releaseMacsOnCommit(List<String> macs) { CompensationContext compensationContext = this.commandContext.getCompensationContext(); ReleaseMacsCompensationListener compensationListener = this.compensationListener; log.debug("Registering macs: to be released in case of successful execution", Arrays.toString(macs.toArray())); compensationListener.macsToReleaseOnCommit.addAll(macs); log.debug("Registering compensation listener {}" + compensationListener); compensationContext.addListener(compensationListener); }

Target:
public void releaseMacsOnCommit(List<String> macs) { CompensationContext compensationContext = this.commandContext.getCompensationContext(); ReleaseMacsCompensationListener compensationListener = this.compensationListener; log.debug("Registering macs: to be released in case of successful execution", macs); compensationListener.macsToReleaseOnCommit.addAll(macs); log.debug("Registering compensation listener {}" + compensationListener); compensationContext.addListener(compensationListener); }
Source:
protected boolean validatePMAgentPort() { Integer port = getParameters().getAgent().getPort(); if (port == null) { String portStr; if (getParameters().getAgent().getOptionsMap().containsKey(PORT)) { portStr = getParameters().getAgent().getOptionsMap().get(PORT); if (StringUtils.isNumeric(portStr)) { port = Integer.valueOf(portStr); } else { return false; } } else { return true; } } return port == null || ValidationUtils.validatePort(port); }

Target:
protected boolean validatePMAgentPort() { Integer port = getParameters().getAgent().getPort(); if (port == null) { if (getParameters().getAgent().getOptionsMap().containsKey(PORT)) { String portStr = getParameters().getAgent().getOptionsMap().get(PORT); if (StringUtils.isNumeric(portStr)) { port = Integer.valueOf(portStr); } else { return false; } } else { return true; } } return port == null || ValidationUtils.validatePort(port); }
Source:
public void run() { Platform.runLater(new Runnable() { @Override public void run() { synchronized (GameWindow.LOCK) { final Timer newTimer = new Timer(); try { InternalTicker.this.step(); if (timer != null) { timer.cancel(); } } finally { if (running) { scheduleTime = scheduleTime.plusNanos(NANOS_PER_TICK); newTimer.schedule(new InternalTicker(newTimer), Date.from(scheduleTime)); } else { newTimer.cancel(); } } } } }); }

Target:
public void run() { Platform.runLater(new Runnable() { public void run() { synchronized (GameWindow.LOCK) { final Timer newTimer = new Timer(); try { InternalTicker.this.step(); if (timer != null) { timer.cancel(); } } finally { if (running) { scheduleTime = scheduleTime.plusNanos( NANOS_PER_TICK); newTimer.schedule(new InternalTicker(newTimer), Date.from(scheduleTime)); } else { newTimer.cancel(); } } } } }); }
Source:
protected Object filterOutboundMessage(Object msg) { if (msg instanceof ByteBuf || msg instanceof FileRegion || msg instanceof SpliceOutTask) { return msg; } throw new UnsupportedOperationException( "unsupported message type: " + StringUtil.simpleClassName(msg) + EXPECTED_TYPES); }

Target:
protected Object filterOutboundMessage(Object msg) { if (msg instanceof ByteBuf) { return UnixChannelUtil.copyIfNonDirect((ByteBuf) msg, alloc()); } if (msg instanceof FileRegion || msg instanceof SpliceOutTask) { return msg; } throw new UnsupportedOperationException( "unsupported message type: " + StringUtil.simpleClassName(msg) + EXPECTED_TYPES); }
Source:
private ISeries createSeries() { IBarSeries series = (IBarSeries) fChart.getSeriesSet().createSeries(SeriesType.BAR, Messages.AbstractSegmentStoreDensityViewer_SeriesLabel); series.setVisible(true); series.setBarPadding(0); Color color = getColorForRGB(BAR_COLOR); series.setBarColor(color); return series; }

Target:
private ISeries createSeries() { IBarSeries series = (IBarSeries) fChart.getSeriesSet().createSeries(SeriesType.BAR, Messages.AbstractSegmentStoreDensityViewer_SeriesLabel); series.setVisible(true); series.setBarPadding(0); series.setBarColor(getColorForRGB(BAR_COLOR)); return series; }
Source:
public List<ComparePair> compareS3ToMs(Path p) throws IOException { Stopwatch stopwatch = Stopwatch.createStarted(); int scannedItems = 0; final Path rootPath = rawFS.qualify(p); S3AFileStatus root = null; try { root = (S3AFileStatus) rawFS.getFileStatus(rootPath); } catch (AWSBadRequestException e) { throw new IOException(e.getMessage()); } final List<ComparePair> comparePairs = new ArrayList<>(); final Queue<S3AFileStatus> queue = new ArrayDeque<>(); queue.add(root); while (!queue.isEmpty()) { final S3AFileStatus currentDir = queue.poll(); scannedItems++; final Path currentDirPath = currentDir.getPath(); List<FileStatus> s3DirListing = Arrays.asList(rawFS.listStatus(currentDirPath)); compareAuthoritativeDirectoryFlag(comparePairs, currentDirPath, s3DirListing); s3DirListing.stream().filter(pm -> pm.isDirectory()) .map(S3AFileStatus.class::cast) .forEach(pm -> queue.add(pm)); final List<S3AFileStatus> children = s3DirListing.stream() .filter(status -> !status.isDirectory()) .map(S3AFileStatus.class::cast).collect(toList()); final List<ComparePair> compareResult = compareS3DirToMs(currentDir, children).stream() .filter(comparePair -> comparePair.containsViolation()) .collect(toList()); comparePairs.addAll(compareResult); scannedItems += children.size(); } stopwatch.stop(); S3GuardFsckViolationHandler handler = new S3GuardFsckViolationHandler(rawFS, metadataStore); comparePairs.forEach(handler::handle); LOG.info("Total scan time: {}s", stopwatch.elapsed(TimeUnit.SECONDS)); LOG.info("Scanned entries: {}", scannedItems); return comparePairs; }

Target:
public List<ComparePair> compareS3ToMs(Path p) throws IOException { Stopwatch stopwatch = Stopwatch.createStarted(); int scannedItems = 0; final Path rootPath = rawFS.qualify(p); S3AFileStatus root = (S3AFileStatus) rawFS.getFileStatus(rootPath); final List<ComparePair> comparePairs = new ArrayList<>(); final Queue<S3AFileStatus> queue = new ArrayDeque<>(); queue.add(root); while (!queue.isEmpty()) { final S3AFileStatus currentDir = queue.poll(); final Path currentDirPath = currentDir.getPath(); try { List<FileStatus> s3DirListing = Arrays.asList( rawFS.listStatus(currentDirPath)); compareAuthoritativeDirectoryFlag(comparePairs, currentDirPath, s3DirListing); s3DirListing.stream().filter(pm -> pm.isDirectory()) .map(S3AFileStatus.class::cast) .forEach(pm -> queue.add(pm)); final List<S3AFileStatus> children = s3DirListing.stream() .filter(status -> !status.isDirectory()) .map(S3AFileStatus.class::cast).collect(toList()); final List<ComparePair> compareResult = compareS3DirContentToMs(currentDir, children); comparePairs.addAll(compareResult); scannedItems++; scannedItems += children.size(); } catch (FileNotFoundException e) { LOG.error("The path has been deleted since it was queued: " + currentDirPath, e); } } stopwatch.stop(); S3GuardFsckViolationHandler handler = new S3GuardFsckViolationHandler(rawFS, metadataStore); comparePairs.forEach(handler::handle); LOG.info("Total scan time: {}s", stopwatch.elapsed(TimeUnit.SECONDS)); LOG.info("Scanned entries: {}", scannedItems); return comparePairs; }
Source:
public Function(StreamInput in) throws IOException { info = new FunctionInfo(in); if (in.getVersion().onOrAfter(Version.V_4_1_0)) { filter = Symbols.nullableFromStream(in); } else { filter = null; } arguments = List.copyOf(Symbols.listFromStream(in)); if (in.getVersion().onOrAfter(Version.V_4_1_0) && in.readBoolean()) { signature = new Signature(in); } else { signature = null; } }

Target:
public Function(StreamInput in) throws IOException { info = new FunctionInfo(in); if (in.getVersion().onOrAfter(Version.V_4_1_0)) { filter = Symbols.nullableFromStream(in); } else { filter = null; } arguments = List.copyOf(Symbols.listFromStream(in)); if (in.getVersion().onOrAfter(Version.V_4_2_0) && in.readBoolean()) { signature = new Signature(in); } else { signature = null; } }
Source:
public void shouldThrowExceptionHttpClient() throws Exception { String name = "name"; when(rapidProHttpClient.executeGet("/groups", MediaFormat.JSON, null)).thenThrow(new RapidProClientException("Exception")); Group fromWebservice = groupWebService.getGroupByName(name); }

Target:
public void shouldThrowExceptionHttpClient() throws Exception { String name = "name"; when(rapidProHttpClient.executeGet("/groups", MediaFormat.JSON, null)).thenThrow(new RapidProClientException("Exception")); groupWebService.getGroupByName(name); }
Source:
private void placeDateBox() { containerTable.setWidget(constantRowIndex, currentColumnMax, dateBox); containerTable.getColumnFormatter().setWidth(currentColumnMax, dateRequired ? "100px" : "0px"); currentColumnMax++; }

Target:
private void placeDateBox() { containerTable.setWidget(constantRowIndex, currentColumnMax, dateBox); containerTable.getColumnFormatter().setStyleName(currentColumnMax, dateRequired ? "dateBoxColumnWidth" : "dateBoxShrink"); currentColumnMax++; }
Source:
public Response newPayment(@Auth Account account, @Valid CreateTelephonePaymentRequest createTelephonePaymentRequest) { Response connectorResponse = createTelephonePaymentService.getConnectorResponse(account, createTelephonePaymentRequest); TelephonePaymentResponse telephonePaymentResponse = createTelephonePaymentService .create(connectorResponse); return connectorResponse.getStatus() == HttpStatus.SC_CREATED ? Response.status(201).entity(telephonePaymentResponse).build() : Response.status(200).entity(telephonePaymentResponse).build(); }

Target:
public Response newPayment(@Auth Account account, @Valid CreateTelephonePaymentRequest createTelephonePaymentRequest) { Response connectorResponse = createTelephonePaymentService.getConnectorResponse(account, createTelephonePaymentRequest); TelephonePaymentResponse telephonePaymentResponse = createTelephonePaymentService .create(connectorResponse); return Response.status(connectorResponse.getStatus()).entity(telephonePaymentResponse).build(); }
Source:
@Override public int getItemViewType(int position) { if (position == mTasksUncompleted.size()) { return VIEW_TYPE_COMPLETED_TASKS_HEADER; } else { return VIEW_TYPE_TASK; } }

Target:
public int getItemViewType(int position) { if (position == mTasksUncompleted.size()) { return VIEW_TYPE_COMPLETED_TASKS_HEADER; } else { return VIEW_TYPE_TASK; } }
Source:
protected void preFinish() { bot.waitUntil(shellIsActive( UIText.FeatureFinishHandler_rewordSquashedCommitMessage)); String text = bot.styledText().getText(); text = text.substring(text.indexOf('\n')); bot.styledText().setText(SQUASHED_COMMENT_SUMMARY + text); bot.button("Reword").click(); }

Target:
protected void preFinish() { bot.waitUntil(shellIsActive( UIText.FeatureFinishHandler_rewordSquashedCommitMessage)); String text = bot.styledText().getText(); text = text.substring(text.indexOf('\n')); bot.styledText().setText(SQUASHED_COMMENT_SUMMARY + text); bot.button(UIText.RebaseInteractiveHandler_EditMessageDialogOkButton) .click(); }