auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public TmfModelResponse<List<ColumnDataModel>> fetchTree(TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { List<ColumnDataModel> model = new ArrayList<>(); long startTimeColumnId = fAtomicLong.getAndIncrement(); model.add(new ColumnDataModel(startTimeColumnId, -1, <START> "Start Time", "", <END> false)); fComparatorMap.put(startTimeColumnId, SegmentComparators.INTERVAL_START_COMPARATOR); long endTimeColumnId = fAtomicLong.getAndIncrement(); model.add(new ColumnDataModel(endTimeColumnId, -1, "End Time", "", false)); fComparatorMap.put(endTimeColumnId, SegmentComparators.INTERVAL_END_COMPARATOR); long durationColumnId = fAtomicLong.getAndIncrement(); model.add(new ColumnDataModel(durationColumnId, -1, "Duration", "", false)); fComparatorMap.put(durationColumnId, SegmentComparators.INTERVAL_LENGTH_COMPARATOR); for (ISegmentAspect segmentAspect : fSegmentStoreProvider.getSegmentAspects()) { Long id = fAspectMap.inverse().computeIfAbsent(segmentAspect, a -> fAtomicLong.getAndIncrement()); fComparatorMap.put(id, (Comparator<ISegment>) segmentAspect.getComparator()); model.add(new ColumnDataModel(id, -1, segmentAspect.getName(), segmentAspect.getHelpText(), false)); } return new TmfModelResponse<>(model, ITmfResponse.Status.COMPLETED, CommonStatusMessage.COMPLETED); }</code><technical_language>externalize</technical_language>

Target:
public TmfModelResponse<List<SegmentStoreTableColumnDataModel>> fetchTree(TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { List<SegmentStoreTableColumnDataModel> model = new ArrayList<>(); long startTimeColumnId = fAtomicLong.getAndIncrement(); model.add(new SegmentStoreTableColumnDataModel(startTimeColumnId, -1, NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnName_StartTime), NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnTooltip_StartTime))); fComparatorMap.put(startTimeColumnId, SegmentComparators.INTERVAL_START_COMPARATOR); long endTimeColumnId = fAtomicLong.getAndIncrement(); model.add(new SegmentStoreTableColumnDataModel(endTimeColumnId, -1, NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnName_EndTime), NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnTooltip_EndTime))); fComparatorMap.put(endTimeColumnId, SegmentComparators.INTERVAL_END_COMPARATOR); long durationColumnId = fAtomicLong.getAndIncrement(); model.add(new SegmentStoreTableColumnDataModel(durationColumnId, -1, NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnName_Duration), NonNullUtils.nullToEmptyString(Messages.SegmentStoreTableColumnTooltip_Duration))); fComparatorMap.put(durationColumnId, SegmentComparators.INTERVAL_LENGTH_COMPARATOR); for (ISegmentAspect segmentAspect : fSegmentStoreProvider.getSegmentAspects()) { long id = fAspectMap.inverse().computeIfAbsent(segmentAspect, a -> fAtomicLong.getAndIncrement()); fComparatorMap.put(id, (Comparator<ISegment>) segmentAspect.getComparator()); model.add(new SegmentStoreTableColumnDataModel(id, -1, segmentAspect.getName(), segmentAspect.getHelpText())); } return new TmfModelResponse<>(model, ITmfResponse.Status.COMPLETED, CommonStatusMessage.COMPLETED); }
Source:
<code>public Response reindex(String vocabularyId, String url) { String[] schemes = { "http", "https", "ftp", "file" }; UrlValidator urlValidator = new UrlValidator(schemes); <START> if (!urlValidator.isValid(url)) { <END> return Response.status(Response.Status.BAD_REQUEST).build(); } if (!this.userIsAdmin()) { return Response.status(Response.Status.FORBIDDEN).build(); } Vocabulary vocabulary = this.vm.getVocabulary(vocabularyId); if (vocabulary == null) { return Response.status(Response.Status.NOT_FOUND).build(); } Response result; try { int reindexStatus = vocabulary.reindex(url); if (reindexStatus == 0) { result = Response.ok().build(); } else if (reindexStatus == 1) { result = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } else { result = Response.status(Response.Status.BAD_REQUEST).build(); } } catch (UnsupportedOperationException e) { result = Response.status(Response.Status.SERVICE_UNAVAILABLE).build(); } return result; }</code><technical_language>This committed, need rebased</technical_language>

Target:
public Response reindex(String vocabularyId, String url) { String[] schemes = { "http", "https", "ftp", "file" }; UrlValidator urlValidator = new UrlValidator(schemes); if (!urlValidator.isValid(url) || !exists(url)) { return Response.status(Response.Status.BAD_REQUEST).build(); } if (!this.userIsAdmin()) { return Response.status(Response.Status.FORBIDDEN).build(); } Vocabulary vocabulary = this.vm.getVocabulary(vocabularyId); if (vocabulary == null) { return Response.status(Response.Status.NOT_FOUND).build(); } Response result; try { int reindexStatus = vocabulary.reindex(url); if (reindexStatus == 0) { result = Response.ok().build(); } else if (reindexStatus == 1) { result = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } else { result = Response.status(Response.Status.BAD_REQUEST).build(); } } catch (UnsupportedOperationException e) { result = Response.status(Response.Status.SERVICE_UNAVAILABLE).build(); } return result; }
Source:
<code>public XBeeIMEIAddress(String address) { if (address == null) throw new NullPointerException(ERROR_IMEI_NULL); Pattern p = Pattern.compile(IMEI_PATTERN); Matcher m = p.matcher(address); <START> if (!m.matches()) <END> throw new IllegalArgumentException(ERROR_IMEI_INVALID); byte[] byteAddress = HexUtils.hexStringToByteArray(address); generateByteAddress(byteAddress); }</code><technical_language>simplify this if (!Pattern.matches(IMEI_PATTERN, address))</technical_language>

Target:
public XBeeIMEIAddress(String address) { if (address == null) throw new NullPointerException(ERROR_IMEI_NULL); if (!Pattern.matches(IMEI_PATTERN, address)) throw new IllegalArgumentException(ERROR_IMEI_INVALID); byte[] byteAddress = HexUtils.hexStringToByteArray(address); generateByteAddress(byteAddress); }
Source:
<code>private void MakeResultText(ResultSet res, TableDesc desc) throws SQLException { ResultSetMetaData rsmd = res.getMetaData(); resultRows = desc.getStats() == null ? 0 : desc.getStats().getNumRows(); if (resultRows <= 0) { resultRows = 1000; } LOG.info("Tajo Query Result: " + desc.getUri() + "\n"); int numOfColumns = rsmd.getColumnCount(); for(int i = 0; i < numOfColumns; i++) { columnNames.add(rsmd.getColumnName(i + 1)); } queryResult = new ArrayList<>(); if(sizeLimit < resultRows) { numOfRows = (long)((float)(resultRows) * ((float)sizeLimit / (float) resultRows)); } else { numOfRows = resultRows; } int currentResultSize = 0; int rowCount = 0; while (res.next()) { <START> if(rowCount > numOfRows || currentResultSize > sizeLimit) { <END> break; } List<Object> row = new ArrayList<>(); for(int i = 0; i < numOfColumns; i++) { String columnValue = String.valueOf(res.getObject(i + 1)); try { currentResultSize += columnValue.getBytes(Bytes.UTF8_ENCODING).length; } catch (Exception e) { } row.add(columnValue); } queryResult.add(row); rowCount++; } }</code><technical_language>numOfRows = (long)((float)(resultRows) * ((float)sizeLimit / (float) resultRows)); 506 line necessary. remove it, too</technical_language>

Target:
private void MakeResultText(ResultSet res, TableDesc desc) throws SQLException { ResultSetMetaData rsmd = res.getMetaData(); resultRows = desc.getStats() == null ? 0 : desc.getStats().getNumRows(); if (resultRows <= 0) { resultRows = 1000; } LOG.info("Tajo Query Result: " + desc.getUri() + "\n"); int numOfColumns = rsmd.getColumnCount(); for(int i = 0; i < numOfColumns; i++) { columnNames.add(rsmd.getColumnName(i + 1)); } queryResult = new ArrayList<>(); int currentResultSize = 0; int rowCount = 0; while (res.next()) { if(rowCount > rowLimit || currentResultSize > sizeLimit) { break; } List<Object> row = new ArrayList<>(); for(int i = 0; i < numOfColumns; i++) { String columnValue = String.valueOf(res.getObject(i + 1)); try { currentResultSize += columnValue.getBytes(Bytes.UTF8_ENCODING).length; } catch (Exception e) { } row.add(columnValue); } queryResult.add(row); rowCount++; } }
Source:
<code>public Matrix4 rotate(double x, double y, double z, double angle) { if (angle == 0) return this; <START> return rotate(mQuat.fromAngleAxis(x, y, z, angle)); <END> }</code><technical_language>return angle == 0 ? this : rotate(mQuat.fromAngleAxis(x,y,z,angle));</technical_language>

Target:
public Matrix4 rotate(double x, double y, double z, double angle) { return angle == 0 ? this :rotate(mQuat.fromAngleAxis(x, y, z, angle)); }
Source:
<code>public void testBug1530ParseError() throws Exception { <START> String c = IOUtils.toString(this.getClass().getResourceAsStream("Bug1530.java"), StandardCharsets.UTF_8); <END> parseJava18(c); }</code><technical_language>readAsString(...) instead</technical_language>

Target:
public void testBug1530ParseError() { String c = readAsString("Bug1530.java"); parseJava18(c); }
Source:
<code><START> private boolean isSchemaAStructSchema(final Schema schema){ <END> return schema.type().equals(Schema.Type.STRUCT); }</code><technical_language>Please run build sourcecheck profile</technical_language>

Target:
private boolean isSchemaAStructSchema(final Schema schema) { return schema != null && schema.type().equals(Schema.Type.STRUCT); }
Source:
<code>public static <T> CopyOnWriteList<T> createCopyOnWriteList(final Class<T> type) { return new CopyOnWriteList<T>() { private ExtensionList<T> storage() { return Jenkins.getInstance().getExtensionList(type); } @Override <START> synchronized public void add(T t) { <END> storage().add(t); } @Override synchronized public boolean remove(T t) { return storage().remove(t); } @Override public Iterator<T> iterator() { return storage().iterator(); } @Override public void replaceBy(CopyOnWriteList<? extends T> that) { throw new UnsupportedOperationException(); } @Override public void replaceBy(Collection<? extends T> that) { throw new UnsupportedOperationException(); } @Override public void replaceBy(T... that) { throw new UnsupportedOperationException(); } @Override public void clear() { throw new UnsupportedOperationException(); } @Override public <T> T[] toArray(T[] array) { return storage().toArray(array); } @Override public List<T> getView() { return storage(); } @Override public void addAllTo(Collection<? super T> dst) { dst.addAll(storage()); } @Override public boolean isEmpty() { return storage().isEmpty(); } }; }</code><technical_language>Typical ordering is public synchronized void</technical_language>

Target:
public static <T> CopyOnWriteList<T> createCopyOnWriteList(final Class<T> type) { return new CopyOnWriteList<T>() { private ExtensionList<T> storage() { return Jenkins.getInstance().getExtensionList(type); } @Override public synchronized void add(T t) { storage().add(t); } @Override public synchronized boolean remove(T t) { return storage().remove(t); } @Override public Iterator<T> iterator() { return storage().iterator(); } @Override public void replaceBy(CopyOnWriteList<? extends T> that) { throw new UnsupportedOperationException(); } @Override public void replaceBy(Collection<? extends T> that) { throw new UnsupportedOperationException(); } @Override public void replaceBy(T... that) { throw new UnsupportedOperationException(); } @Override public void clear() { throw new UnsupportedOperationException(); } @Override public <T> T[] toArray(T[] array) { return storage().toArray(array); } @Override public List<T> getView() { return storage(); } @Override public void addAllTo(Collection<? super T> dst) { dst.addAll(storage()); } @Override public boolean isEmpty() { return storage().isEmpty(); } }; }
Source:
<code>public void testComputeIfAbsentExpired() throws Exception { TestTimeSource timeSource = new TestTimeSource(); OnHeapStore<String, String> store = newStore(timeSource, Expirations.timeToLiveExpiration(new Duration(1, TimeUnit.MILLISECONDS))); store.put("key", "value"); StoreEventListener<String, String> listener = addListener(store); timeSource.advanceTime(1); ValueHolder<String> newValue = store.computeIfAbsent("key", new Function<String, String>() { @Override public String apply(String mappedKey) { assertThat(mappedKey, equalTo("key")); return "value2"; } }); assertThat(newValue.value(), equalTo("value2")); assertThat(store.get("key").value(), equalTo("value2")); <START> verify(listener).onExpiration(argThat(new ArgumentMatcher<String>() { <END> @Override public boolean matches(Object argument) { return "key".equals(argument); } }), argThat(new ArgumentMatcher<Store.ValueHolder<String>>() { @Override public boolean matches(Object argument) { return ((Store.ValueHolder<String>)argument).value().equals("value"); } }) ); }</code><technical_language>argThat(...) replaced eq("key") in other tests, extracted internal method remove code duplication tests</technical_language>

Target:
public void testComputeIfAbsentExpired() throws Exception { TestTimeSource timeSource = new TestTimeSource(); OnHeapStore<String, String> store = newStore(timeSource, Expirations.timeToLiveExpiration(new Duration(1, TimeUnit.MILLISECONDS))); store.put("key", "value"); StoreEventListener<String, String> listener = addListener(store); timeSource.advanceTime(1); ValueHolder<String> newValue = store.computeIfAbsent("key", new Function<String, String>() { @Override public String apply(String mappedKey) { assertThat(mappedKey, equalTo("key")); return "value2"; } }); assertThat(newValue.value(), equalTo("value2")); assertThat(store.get("key").value(), equalTo("value2")); final String value = "value"; verify(listener).onExpiration(eq("key"), valueHolderValueEq(value)); }
Source:
<code>public void testLookupOuterJoinWithEmptyLookupSource(boolean parallelBuild, boolean probeHashEnabled, boolean buildHashEnabled) throws Exception { TaskContext taskContext = createTaskContext(); List<Type> buildTypes = ImmutableList.of(VARCHAR); RowPagesBuilder buildPages = rowPagesBuilder(buildHashEnabled, Ints.asList(0), buildTypes); LookupSourceFactoryManager lookupSourceFactoryManager = buildHash(parallelBuild, taskContext, Ints.asList(0), buildPages, Optional.empty()); List<Type> probeTypes = ImmutableList.of(VARCHAR); RowPagesBuilder probePages = rowPagesBuilder(probeHashEnabled, Ints.asList(0), probeTypes); <START> OperatorFactory joinOperatorFactory = (new LookupJoinOperators()).lookupOuterJoin( <END> 0, new PlanNodeId("test"), lookupSourceFactoryManager, probePages.getTypes(), Ints.asList(0), getHashChannelAsInt(probePages), Optional.empty(), OptionalInt.of(1), PARTITIONING_SPILLER_FACTORY); Operator operator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(0, true, true).addDriverContext()); List<Page> pages = probePages.row("test").build(); operator.addInput(pages.get(0)); Page outputPage = operator.getOutput(); assertNull(outputPage); assertFalse(operator.needsInput()); assertTrue(operator.isFinished()); }</code><technical_language>I need extra parentheses in other tests</technical_language>

Target:
public void testLookupOuterJoinWithEmptyLookupSource(boolean parallelBuild, boolean probeHashEnabled, boolean buildHashEnabled) { TaskContext taskContext = createTaskContext(); List<Type> buildTypes = ImmutableList.of(VARCHAR); RowPagesBuilder buildPages = rowPagesBuilder(buildHashEnabled, Ints.asList(0), buildTypes); LookupSourceFactoryManager lookupSourceFactoryManager = buildHash(parallelBuild, taskContext, Ints.asList(0), buildPages, Optional.empty()); List<Type> probeTypes = ImmutableList.of(VARCHAR); RowPagesBuilder probePages = rowPagesBuilder(probeHashEnabled, Ints.asList(0), probeTypes); OperatorFactory joinOperatorFactory = new LookupJoinOperators().lookupOuterJoin( 0, new PlanNodeId("test"), lookupSourceFactoryManager, probePages.getTypes(), Ints.asList(0), getHashChannelAsInt(probePages), Optional.empty(), OptionalInt.of(1), PARTITIONING_SPILLER_FACTORY); Operator operator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(0, true, true).addDriverContext()); List<Page> pages = probePages.row("test").build(); operator.addInput(pages.get(0)); Page outputPage = operator.getOutput(); assertNull(outputPage); assertFalse(operator.needsInput()); }
Source:
<code>private void startDebugging(IServer server, IDeploymentConfig dc, DebuggingContext debugContext, IProgressMonitor monitor) throws CoreException { int remotePort = debugContext.getDebugPort(); if( remotePort == -1 ) { debugContext.setDebugPort(8787); } IDebugListener listener = new IDebugListener() { @Override public void onDebugChange(DebuggingContext debuggingContext, IProgressMonitor monitor) throws CoreException { if (debuggingContext.getPod() == null) { throw toCoreException("Unable to connect to remote pod"); } int localPort = mapPortForwarding(debuggingContext, monitor); if(isJavaProject(server)) { ILaunch debuggerLaunch = attachRemoteDebugger(server, localPort, monitor); if( debuggerLaunch != null ) { overrideHotcodeReplace(server, debuggerLaunch); } <START> } else if (isNodeJsProject(server)) { <END> DebugTrackerContributionEvaluation.startDebugSession(server, localPort); } } @Override public void onPodRestart(DebuggingContext debuggingContext, IProgressMonitor monitor) throws CoreException { onDebugChange(debuggingContext, monitor); } }; debugContext.setDebugListener(listener); OpenShiftDebugUtils.get().enableDebugMode(dc, debugContext, monitor); }</code><technical_language>I this check done in NodeDebugSessionTracker. OpenShift launch controller notifies registered trackers tracker ignore project action</technical_language>

Target:
private void startDebugging(IServer server, IDeploymentConfig dc, DebuggingContext debugContext, IProgressMonitor monitor) throws CoreException { int remotePort = debugContext.getDebugPort(); if( remotePort == -1 ) { debugContext.setDebugPort(8787); } IDebugListener listener = new IDebugListener() { @Override public void onDebugChange(DebuggingContext debuggingContext, IProgressMonitor monitor) throws CoreException { if (debuggingContext.getPod() == null) { throw toCoreException("Unable to connect to remote pod"); } int localPort = mapPortForwarding(debuggingContext, monitor); if(isJavaProject(server)) { ILaunch debuggerLaunch = attachRemoteDebugger(server, localPort, monitor); if( debuggerLaunch != null ) { overrideHotcodeReplace(server, debuggerLaunch); } } else { DebugTrackerContributionEvaluation.startDebugSession(server, localPort); } } @Override public void onPodRestart(DebuggingContext debuggingContext, IProgressMonitor monitor) throws CoreException { onDebugChange(debuggingContext, monitor); } }; debugContext.setDebugListener(listener); OpenShiftDebugUtils.get().enableDebugMode(dc, debugContext, monitor); }
Source:
<code>public static EC2HardwareBuilder c5d_4xlarge() { return new EC2HardwareBuilder(InstanceType.C5D_4XLARGE).c5() .ram(32768) .processors(ImmutableList.of(new Processor(16.0, 3.0))) .volumes(ImmutableList.<Volume>of( new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(), <START> new VolumeBuilder().type(LOCAL).size(400.0f).device("/dev/sdb").bootDevice(false).durable(false).build())) <END> .is64Bit(true); }</code><technical_language>450.0f</technical_language>

Target:
public static EC2HardwareBuilder c5d_4xlarge() { return new EC2HardwareBuilder(InstanceType.C5D_4XLARGE).c5() .ram(32768) .processors(ImmutableList.of(new Processor(16.0, 3.0))) .volumes(ImmutableList.<Volume>of( new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(), new VolumeBuilder().type(LOCAL).size(450.0f).device("/dev/sdb").bootDevice(false).durable(false).build())) .is64Bit(true); }
Source:
<code><START> public PrimitiveType(Repetition repetition, PrimitiveTypeName primitive, <END> String name, LogicalTypeAnnotation logicalTypeAnnotation) { this(repetition, primitive, 0, name, logicalTypeAnnotation, null, null); }</code><technical_language>Types created builders. other public constructors deprecated. please leave package protected builders in caller side</technical_language>

Target:
PrimitiveType(Repetition repetition, PrimitiveTypeName primitive, String name, LogicalTypeAnnotation logicalTypeAnnotation) { this(repetition, primitive, 0, name, logicalTypeAnnotation, null, null); }
Source:
<code>public void shutdown() throws Exception { <START> logger.info("Admin blob storage service shutdown"); <END> }</code><technical_language>is this throwing Exception? throw anything</technical_language>

Target:
public void shutdown() { logger.info("AdminBlobStorageService shutdown complete"); }
Source:
<code>public void testServiceFoundWithValidResponseAndGzip() throws Exception { <START> when(mockRequest.headers(HttpHeaders.ACCEPT_ENCODING)).thenReturn(GZIP); <END> when(mockRequest.params(QUERY_PARAM)).thenReturn(RETURN_ID); String res = (String) cqlTransformHandler.handle(mockRequest, mockResponse); assertThat(res, is(SERVICE_SUCCESS)); }</code><technical_language>more assertions in tests. check handler is attaching file is setting correct HTTP headers status codes</technical_language>

Target:
public void testServiceFoundWithValidResponseAndGzip() throws Exception { when(mockRequest.headers(HttpHeaders.ACCEPT_ENCODING)).thenReturn(GZIP); when(mockRequest.params(QUERY_PARAM)).thenReturn(RETURN_ID); String res = Boon.toJson(cqlTransformHandler.handle(mockRequest, mockResponse)); assertThat(res, is(SERVICE_SUCCESS)); assertThat(mockResponse.status(), is(HttpStatus.OK_200)); assertThat( mockResponse.getHeaders().get(HttpHeaders.CONTENT_DISPOSITION), matchesPattern(ATTACHMENT_REGEX)); assertThat(mockResponse.getHeaders().get(HttpHeaders.CONTENT_ENCODING), is(GZIP)); assertThat(mockResponse.type(), is(MIME_TYPE)); }
Source:
<code>public String getRemoteCapabilities() { if (getCurrentWebDriver() instanceof RemoteWebDriver && ((RemoteWebDriver) getCurrentWebDriver()).getCapabilities() != null) { <START> logging.info(getCurrentWebDriver().toString()); <END> return ((RemoteWebDriver) getCurrentWebDriver()).getCapabilities().toString(); } else { return "No remote session id or capabilities available"; } }</code><technical_language>add more information this log: logging.info(String.format("Sitting capabilities for current browser - %s", getCurrentWebDriver().toString()));</technical_language>

Target:
public String getRemoteCapabilities() { if (getCurrentWebDriver() instanceof RemoteWebDriver && ((RemoteWebDriver) getCurrentWebDriver()).getCapabilities() != null) { logging.info(String.format("Capabilities supported by current browser:\n%s", getCurrentWebDriver().toString())); return ((RemoteWebDriver) getCurrentWebDriver()).getCapabilities().toString(); } else { return "No remote session id or capabilities available"; } }
Source:
<code>TransportHttp(final Repository local, final URIish uri) throws NotSupportedException { super(local, uri); try { String uriString = uri.toString(); if (!uriString.endsWith("/")) uriString += "/"; baseUrl = new URL(uriString); objectsUrl = new URL(baseUrl, "objects/"); } catch (MalformedURLException e) { throw new NotSupportedException(MessageFormat.format(JGitText.get().invalidURL, uri), e); } http = local.getConfig().get(HTTP_KEY); <START> sslVerify = local.getConfig().getBoolean("http", "sslVerify", true); <END> proxySelector = ProxySelector.getDefault(); }</code><technical_language>This moved HttpConfig object, part of cached HttpConfig obtain repository config file changes file</technical_language>

Target:
TransportHttp(final Repository local, final URIish uri) throws NotSupportedException { super(local, uri); try { String uriString = uri.toString(); if (!uriString.endsWith("/")) uriString += "/"; baseUrl = new URL(uriString); objectsUrl = new URL(baseUrl, "objects/"); } catch (MalformedURLException e) { throw new NotSupportedException(MessageFormat.format(JGitText.get().invalidURL, uri), e); } http = local.getConfig().get(HTTP_KEY); proxySelector = ProxySelector.getDefault(); }
Source:
<code>private static boolean canResolveAllParameterTypes(Collection<String> usedDeclarations, boolean skipFirstParamAsThis, Optional<Class<?>> patternClass, RuleContext ruleContext) { <START> if (!skipFirstParamAsThis && (!patternClass.isPresent() || patternClass.get().equals(Object.class))) { <END> return false; } if (usedDeclarations.isEmpty()) { return true; } return usedDeclarations.stream().map(decl -> getDelarationType(ruleContext, decl)).noneMatch(type -> type instanceof UnknownType); }</code><technical_language>unused code then, remove thanks</technical_language>

Target:
private static boolean canResolveAllParameterTypes(Collection<String> usedDeclarations, boolean skipFirstParamAsThis, Optional<Class<?>> patternClass, RuleContext ruleContext) { if (!skipFirstParamAsThis && !patternClass.isPresent()) { return false; } if (usedDeclarations.isEmpty()) { return true; } return usedDeclarations.stream().map(decl -> getDelarationType(ruleContext, decl)).noneMatch(type -> type instanceof UnknownType); }
Source:
<code>public void setTheme(String theme){ if(theme.equals("Dark.css")){ <START> previewView.getEngine().setUserStyleSheetLocation(getClass().getResource("Dark_preview.css").toString()); <END> } }</code><technical_language>loading external resource... reuse original Dark.css (<LINK_0> here</technical_language>

Target:
public void setTheme(String theme) { if (theme.equals(ThemeLoader.DARK_CSS)) { previewView.getEngine().setUserStyleSheetLocation(JabRefFrame.class.getResource(ThemeLoader.DARK_CSS).toString()); } }
Source:
<code>protected void closeTailer() { if (tailer != null && !tailer.closed()) { try { tailer.close(); <START> } catch (Exception e) { <END> log.debug(metadata.name() + ": Exception while closing tailer", e); } } }</code><technical_language>catch Exception, more specific</technical_language>

Target:
protected void closeTailer() { if (tailer != null && !tailer.closed()) { tailer.close(); } }
Source:
<code>public DefaultArgumentsAccessor(Object[] arguments) { Preconditions.notNull(arguments, "DefaultArgumentsAccessor initialized with null arguments"); <START> this.arguments = arguments; <END> }</code><technical_language>JUnit 5 team myself, I if making creating a copy of this array for _defensive programming_ purposes a good idea. thinking of like: java this.arguments = Arrays.copyOf(arguments, arguments.length);</technical_language>

Target:
public DefaultArgumentsAccessor(Object[] arguments) { Preconditions.notNull(arguments, "Arguments array must not be null"); this.arguments = arguments; }
Source:
<code>public final void setChildren(IEditorPart[] children) { innerEditors = children; activeEditorIndex = 0; for (IEditorPart <START> element : <END> children) { element.addPropertyListener( (source, propId) -> handlePropertyChange(propId)); } innerEditorsCreated(); }</code><technical_language>rename 'child'</technical_language>

Target:
public final void setChildren(IEditorPart[] children) { innerEditors = children; activeEditorIndex = 0; for (IEditorPart child : children) { child.addPropertyListener( (source, propId) -> handlePropertyChange(propId)); } innerEditorsCreated(); }
Source:
<code>public void initColumnsWithTaskVarColumnsTest() { final ExtendedPagedTable<TaskSummary> currentListGrid = spy(new ExtendedPagedTable<>(new GridGlobalPreferences())); doAnswer(new Answer() { @Override public Void answer(InvocationOnMock invocationOnMock) throws Throwable { final List<ColumnMeta> columns = (List<ColumnMeta>) invocationOnMock.getArguments()[0]; <START> assertEquals(columns.size(), 19); <END> return null; } }).when(currentListGrid).addColumns(anyList()); ArrayList<GridColumnPreference> columnPreferences = new ArrayList<GridColumnPreference>(); columnPreferences.add(new GridColumnPreference("var1", 0, "40")); columnPreferences.add(new GridColumnPreference("var2", 1, "40")); columnPreferences.add(new GridColumnPreference("var3", 1, "40")); when(currentListGrid.getGridPreferencesStore()).thenReturn(gridPreferencesStore); when(gridPreferencesStore.getColumnPreferences()).thenReturn(columnPreferences); getView().initColumns(currentListGrid); verify(currentListGrid).addColumns(anyList()); }</code><technical_language>expected valued parameter in _assertEquals_</technical_language>

Target:
public void initColumnsWithTaskVarColumnsTest() { final ExtendedPagedTable<TaskSummary> currentListGrid = spy(new ExtendedPagedTable<>(new GridGlobalPreferences())); doAnswer(new Answer() { @Override public Void answer(InvocationOnMock invocationOnMock) throws Throwable { final List<ColumnMeta> columns = (List<ColumnMeta>) invocationOnMock.getArguments()[0]; assertEquals(19, columns.size()); return null; } }).when(currentListGrid).addColumns(anyList()); ArrayList<GridColumnPreference> columnPreferences = new ArrayList<GridColumnPreference>(); columnPreferences.add(new GridColumnPreference("var1", 0, "40")); columnPreferences.add(new GridColumnPreference("var2", 1, "40")); columnPreferences.add(new GridColumnPreference("var3", 1, "40")); when(currentListGrid.getGridPreferencesStore()).thenReturn(gridPreferencesStore); when(gridPreferencesStore.getColumnPreferences()).thenReturn(columnPreferences); getView().initColumns(currentListGrid); verify(currentListGrid).addColumns(anyList()); }
Source:
<code>public void testCompareToCornerCases4() { <START> assertEquals("compareTo", 1, ts0.compareTo(null)); <END> }</code><technical_language>0</technical_language>

Target:
public void testCompareToCornerCases4() { assertTrue("compareTo", ts0.compareTo(null) > 0); }
Source:
<code>static boolean put( ImmutableTable.Builder<Granularity, RollupType, TimeValue> ttlMapBuilder, Configuration config, Granularity gran, RollupType rollupType, TtlConfig configKey) { int value; try { value = config.getIntegerProperty(configKey); if (value < 0) return false; } catch (NumberFormatException e) { <START> log.info("No valid TTL config set for granularity: {}, rollup type: {}", gran.name(), rollupType.name()); <END> return false; } ttlMapBuilder.put(gran, rollupType, new TimeValue(value, TimeUnit.DAYS)); return true; }</code><technical_language>Please include exception in log statement</technical_language>

Target:
private boolean put( ImmutableTable.Builder<Granularity, RollupType, TimeValue> ttlMapBuilder, Configuration config, Granularity gran, RollupType rollupType, TtlConfig configKey) { int value; try { value = config.getIntegerProperty(configKey); if (value < 0) return false; } catch (NumberFormatException ex) { log.info(String.format("No valid TTL config set for granularity: %s, rollup type: %s", gran.name(), rollupType.name()), ex); return false; } ttlMapBuilder.put(gran, rollupType, new TimeValue(value, TimeUnit.DAYS)); return true; }
Source:
<code>public void read(StatementRestrictions restrictions, QueryOptions options, ResultBuilder result) { UUID hostId = StorageService.instance.getLocalHostUUID(); for (Map<String, String> c : CompactionManager.instance.getCompactions()) { <START> result.row(hostId, UUID.fromString(c.get("compactionId"))) <END> .column("task_type", c.get("taskType")) .column("keyspace_name", c.get("keyspace")) .column("table_name", c.get("columnFamily")) .column("bytes_compacted", c.get("completed")) .column("bytes_total", c.get("total")) .endRow(); } }</code><technical_language>$0.02 is if duping strings everywhere, do some statics a nudist colony of naked literals</technical_language>

Target:
public void read(StatementRestrictions restrictions, QueryOptions options, ResultBuilder result) { UUID hostId = StorageService.instance.getLocalHostUUID(); for (Map<String, String> c : CompactionManager.instance.getCompactions()) { result.row(hostId, UUID.fromString(c.get(CompactionInfo.COMPACTION_ID))) .column(TASK_TYPE, c.get(CompactionInfo.TASK_TYPE)) .column(KEYSPACE_NAME, c.get(CompactionInfo.KEYSPACE)) .column(TABLE_NAME, c.get(CompactionInfo.COLUMNFAMILY)) .column(BYTES_COMPACTED, c.get(CompactionInfo.COMPLETED)) .column(BYTES_TOTAL, c.get(CompactionInfo.TOTAL)) .endRow(); } }
Source:
<code><START> public EventExecutor executor() { <END> return executor; }</code><technical_language>feel this if this method protected. public in Netty 5</technical_language>

Target:
public final EventExecutor executor() { return executor; }
Source:
<code>public void closeFade() { if (fadeJob != null) { fadeJob.cancelAndWait(false); } <START> fadeJob = AnimationUtil.fadeOut(getShell(), new IFadeListener() { <END> public void faded(Shell shell, int alpha) { if (!shell.isDisposed()) { if (alpha == 0) { shell.close(); } else if (isMouseOver(shell)) { if (fadeJob != null) { fadeJob.cancelAndWait(false); } fadeJob = AnimationUtil.fastFadeIn(shell, new IFadeListener() { public void faded(Shell shell, int alpha) { if (shell.isDisposed()) { return; } if (alpha == 255) { scheduleAutoClose(); } } }); } } } }); }</code><technical_language>![MAJOR](<LINK_1> Reduce this anonymous class number of lines 26 20, a named class. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
public void closeFade() { if (fadeJob != null) { fadeJob.cancelAndWait(false); } fadeJob = AnimationUtil.fadeOut(getShell(), new IFadeListener() { @Override public void faded(Shell shell, int alpha) { if (!shell.isDisposed()) { if (alpha == 0) { shell.close(); } else if (isMouseOver(shell)) { if (fadeJob != null) { fadeJob.cancelAndWait(false); } fadeJob = AnimationUtil.fastFadeIn(shell, new IFadeListener() { @Override public void faded(Shell shell, int alpha) { if (shell.isDisposed()) { return; } if (alpha == 255) { scheduleAutoClose(); } } }); } } } }); }
Source:
<code>protected boolean canDoAction() { boolean result = true; UserProfile dbProfile = userProfileDao.getByUserId(getUserId()); UserProfile givenProfile = getParameters().getUserProfile(); <START> if (dbProfile == null || dbProfile.getId().equals(givenProfile.getId()) == false) { <END> log.warn("Profile ID mismatch: expected in profile received {}", dbProfile.getId().toString(), givenProfile.getId().toString()); setActionMessageParameters(); result = false; } return result; }</code><technical_language>please prefer !a.equals(b) a.equals(b) == false</technical_language>

Target:
protected boolean canDoAction() { UserProfile dbProfile = userProfileDao.getByUserId(getUserId()); UserProfile givenProfile = getParameters().getUserProfile(); if (dbProfile == null || !dbProfile.getId().equals(givenProfile.getId())) { log.warn("Profile ID mismatch: expected in profile received {}", dbProfile.getId().toString(), givenProfile.getId().toString()); return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_PROFILE_NOT_EXIST); } return true; }
Source:
<code>protected void appendNulls() { if (decodedBlock.mayHaveNull()) { <START> ensureNullsValueBufferSize(); <END> int bufferedNullsCount = nullsBufferIndex * BITS_IN_BYTE + remainingNullsCount; if (bufferedPositionCount > bufferedNullsCount) { int falsesToWrite = bufferedPositionCount - bufferedNullsCount; encodeFalseValuesAsBits(falsesToWrite); verify(nullsBufferIndex * BITS_IN_BYTE + remainingNullsCount == bufferedPositionCount); } encodeNullsAsBits(decodedBlock); verify(nullsBufferIndex * BITS_IN_BYTE + remainingNullsCount == bufferedPositionCount + batchSize); } else { if (containsNull()) { verify(nullsBufferIndex * BITS_IN_BYTE + remainingNullsCount == bufferedPositionCount); ensureNullsValueBufferSize(); encodeFalseValuesAsBits(batchSize); verify(nullsBufferIndex * BITS_IN_BYTE + remainingNullsCount == bufferedPositionCount + batchSize); } } }</code><technical_language>ensureNullsValueBufferSize -> ensureNullsBufferCapacity</technical_language>

Target:
protected void appendNulls() { if (decodedBlock.mayHaveNull()) { ensureNullsValueBufferCapacity(); int bufferedNullsCount = nullsBufferIndex * BITS_IN_BYTE + remainingNullsCount; if (bufferedPositionCount > bufferedNullsCount) { encodeNonNullsAsBits(bufferedPositionCount - bufferedNullsCount); } encodeNullsAsBits(decodedBlock); } else if (containsNull()) { ensureNullsValueBufferCapacity(); encodeNonNullsAsBits(batchSize); } }
Source:
<code>public void filter(ContainerRequestContext requestContext) throws IOException { String operation = requestContext.getMethod() + " /" + requestContext.getUriInfo().getPath(); String traceId = requestContext.getHeaderString(TraceHttpHeaders.TRACE_ID); String spanId = requestContext.getHeaderString(TraceHttpHeaders.SPAN_ID); if (Strings.isNullOrEmpty(traceId)) { Tracer.initTrace(Optional.<Boolean>absent(), Tracers.randomId()); Tracer.startSpan(operation); } else { Tracer.initTrace(hasSampledHeader(requestContext), traceId); if (spanId == null) { Tracer.startSpan(operation); } else { Tracer.startSpan(operation, spanId); } } <START> MDC.put(MDC_KEY, Tracer.getTraceId()); <END> }</code><technical_language>in addition this add request attributes, e.g.: // convention is package naming requestContext.setProperty("com.palantir.remoting1.traceId", Tracer.getTraceId());</technical_language>

Target:
public void filter(ContainerRequestContext requestContext) throws IOException { String operation = requestContext.getMethod() + " /" + requestContext.getUriInfo().getPath(); String traceId = requestContext.getHeaderString(TraceHttpHeaders.TRACE_ID); String spanId = requestContext.getHeaderString(TraceHttpHeaders.SPAN_ID); if (Strings.isNullOrEmpty(traceId)) { Tracer.initTrace(Optional.<Boolean>absent(), Tracers.randomId()); Tracer.startSpan(operation); } else { Tracer.initTrace(hasSampledHeader(requestContext), traceId); if (spanId == null) { Tracer.startSpan(operation); } else { Tracer.startSpan(operation, spanId); } } MDC.put(MDC_KEY, Tracer.getTraceId()); requestContext.setProperty("com.palantir.remoting1.traceId", Tracer.getTraceId()); }
Source:
<code><START> public void testGetProcessInstanceImageViaUIClientTest() throws Exception { <END> long processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_PROCESS_ID); assertTrue(processInstanceId > 0); try { String result = uiServicesClient.getProcessInstanceImage(CONTAINER_ID, processInstanceId); logger.debug("Image content is '{}'", result); assertNotNull(result); assertFalse(result.isEmpty()); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_2_PROCESS_ID); assertTrue(processInstanceId > 0); try { String result = uiServicesClient.getProcessInstanceImage(CONTAINER_ID, processInstanceId); logger.debug("Image content is '{}'", result); assertNotNull(result); assertFalse(result.isEmpty()); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_3_PROCESS_ID); assertTrue(processInstanceId > 0); try { String result = uiServicesClient.getProcessInstanceImage(CONTAINER_ID, processInstanceId); logger.debug("Image content is '{}'", result); assertNotNull(result); assertFalse(result.isEmpty()); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } }</code><technical_language>Basically issue mentioned above, I believe</technical_language>

Target:
public void testGetProcessInstanceImageViaUIClientTest() throws Exception { long processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_PROCESS_ID); assertTrue(processInstanceId > 0); try { String result = uiServicesClient.getProcessInstanceImage(CONTAINER_ID, processInstanceId); assertImageContent(result); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_2_PROCESS_ID); assertTrue(processInstanceId > 0); try { String result = uiServicesClient.getProcessInstanceImage(CONTAINER_ID, processInstanceId); assertImageContent(result); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } processInstanceId = processClient.startProcess(CONTAINER_ID, HIRING_3_PROCESS_ID); assertTrue(processInstanceId > 0); try { String result = uiServicesClient.getProcessInstanceImage(CONTAINER_ID, processInstanceId); assertImageContent(result); } finally { processClient.abortProcessInstance(CONTAINER_ID, processInstanceId); } }
Source:
<code>public void checkGoToSymbolFeature() { editor.goToCursorPositionVisible(14, 7); <START> List<String > expectedListSymbols = <END> Arrays.asList( "greeter", "Greeter", "greet", "constructor", "\"Greeter\"", "print", "printVar", "greeting"); menu.runCommand(ASSISTANT, GO_TO_SYMBOL); assistantFindPanel.waitAllNodes(expectedListSymbols); assistantFindPanel.clickOnActionNodeWithTextEqualsTo("greet"); editor.waitCursorPosition(19, 5); }</code><technical_language>expectedGoToSymbolAlternatives</technical_language>

Target:
public void checkGoToSymbolFeature() { editor.goToCursorPositionVisible(14, 7); List<String> expectedGoToSymbolAlternatives = Arrays.asList( "greeter", "Greeter", "greet", "constructor", "\"Greeter\"", "print", "printVar", "greeting"); menu.runCommand(ASSISTANT, GO_TO_SYMBOL); assistantFindPanel.waitAllNodes(expectedGoToSymbolAlternatives); assistantFindPanel.clickOnActionNodeWithTextContains("greet"); editor.waitCursorPosition(19, 5); }
Source:
<code>public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateErrorEventCatching emptySubprocessEvent = getCatchingIntermediateNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, HAS_NO_OUTGOING_EDGE); assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); <START> assertErrorEventExecutionSet(emptySubprocessEvent.getExecutionSet(), EMPTY_VALUE, CANCELLING, ""); <END> assertDataIOSet(emptySubprocessEvent.getDataIOSet(), EMPTY_VALUE); }</code><technical_language>suggestion assertErrorEventExecutionSet(emptySubprocessEvent.getExecutionSet(), EMPTY_VALUE, CANCELLING, EMPTY_VALUE);</technical_language>

Target:
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_CATCHING_INTERMEDIATE_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); IntermediateErrorEventCatching emptySubprocessEvent = getCatchingIntermediateNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, HAS_NO_OUTGOING_EDGE); assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertErrorEventExecutionSet(emptySubprocessEvent.getExecutionSet(), EMPTY_VALUE, CANCELLING, EMPTY_VALUE); assertDataIOSet(emptySubprocessEvent.getDataIOSet(), EMPTY_VALUE); }
Source:
<code>public static <T, E extends Exception> ListenableFuture<T> maybeLogAsync( CallableCheckedException<ListenableFuture<T>, E> action, BiConsumer<LoggingFunction, Stopwatch> primaryLogger, BiConsumer<LoggingFunction, T> additionalLoggerWithAccessToResult) throws E { if (log.isTraceEnabled() || slowlogger.isWarnEnabled()) { Monitor<T> monitor = Monitor.createMonitor( primaryLogger, additionalLoggerWithAccessToResult, slowLogPredicate); ListenableFuture<T> future = action.call(); Futures.addCallback(future, new FutureCallback<T>() { @Override public void onSuccess(@NullableDecl T result) { monitor.registerResult(result); monitor.log(); } @Override public void onFailure(Throwable t) { monitor.registerException(new Exception(t)); monitor.log(); } <START> }, Executors.newSingleThreadExecutor()); <END> return future; } else { return action.call(); } }</code><technical_language>this kill clients pretty quickly if creating executors single threads quickly, some sort of autobatching @jeremyk-91 ? handle this. I want direct executor run callbacks, want "queue" autobatcher act outcome of callback</technical_language>

Target:
public static <T, E extends Exception> ListenableFuture<T> maybeLogAsync( CallableCheckedException<ListenableFuture<T>, E> action, BiConsumer<LoggingFunction, Stopwatch> primaryLogger, BiConsumer<LoggingFunction, T> additionalLoggerWithAccessToResult) throws E { ListenableFuture<T> future = action.call(); if (log.isTraceEnabled() || slowlogger.isWarnEnabled()) { Monitor<T> monitor = Monitor.createMonitor( primaryLogger, additionalLoggerWithAccessToResult, slowLogPredicate); Futures.addCallback(future, new FutureCallback<T>() { @Override public void onSuccess(@NullableDecl T result) { monitor.registerResult(result); monitor.log(); } @Override public void onFailure(Throwable t) { monitor.registerException(new Exception(t)); monitor.log(); } }, MoreExecutors.directExecutor()); } return future; }
Source:
<code>private void initButtons() { cancelDownloadButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_cancelDownload"))); cancelDownloadButton.managedProperty().bind(cancelDownloadButton.visibleProperty()); cancelDownloadButton.setVisible(false); if (!selectedPackage.isInstalled()) { startAndDownloadButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_download"))); } else { <START> startAndDownloadButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_start"))); <END> } startAndDownloadButton.managedProperty().bind(startAndDownloadButton.visibleProperty()); startAndDownloadButton.setGraphic(downloadImage); deleteButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_delete"))); settingsButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_settings"))); exitButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_exit"))); }</code><technical_language>right, fact this is a download play action is determined selected package is installed not. JavaFX concept of _bindings_ allows bind a else, e.g., property of installed. this works in detail, though</technical_language>

Target:
private void initButtons() { cancelDownloadButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_cancelDownload"))); cancelDownloadButton.managedProperty().bind(cancelDownloadButton.visibleProperty()); cancelDownloadButton.setVisible(false); playButtonTooltip = new SimpleObjectProperty<>(new Tooltip(BundleUtils.getLabel("launcher_download"))); startAndDownloadButton.tooltipProperty().bind(playButtonTooltip); startAndDownloadButton.managedProperty().bind(startAndDownloadButton.visibleProperty()); startAndDownloadButton.setGraphic(downloadImage); deleteButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_delete"))); settingsButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_settings"))); exitButton.setTooltip(new Tooltip(BundleUtils.getLabel("launcher_exit"))); }
Source:
<code>public Iterable<String> getNames() { <START> return Iterables.concat(Iterables.transform(dataSources, new Function<DataSource, Iterable<String>>() <END> { @Override public Iterable<String> apply(DataSource input) { return input.getNames(); } })); }</code><technical_language>this need calculated fly time save iterable</technical_language>

Target:
public List<String> getNames() { return Lists.transform( dataSources, new Function<TableDataSource, String>() { @Override public String apply(TableDataSource input) { return Iterables.getOnlyElement(input.getNames()); } } ); }
Source:
<code>public void configure(final GsonBuilder gsonBuilder) { <START> gsonBuilder.registerTypeAdapter( Payload.class, new PayloadAdapter() ); <END> gsonBuilder.registerTypeAdapter(Contentlet.class, new ContentletDeserializer() ); gsonBuilder.registerTypeAdapter(HTMLPageAsset.class, new ContentletDeserializer() ); }</code><technical_language>If Deserializer is named, Deserializer. Serializer call Serializer</technical_language>

Target:
public void configure(final GsonBuilder gsonBuilder) { gsonBuilder.registerTypeAdapter( Payload.class, new PayloadAdapter() ); gsonBuilder.registerTypeAdapter(Contentlet.class, new ContentletDeserializer() ); gsonBuilder.registerTypeAdapter(HTMLPageAsset.class, new ContentletDeserializer() ); gsonBuilder.registerTypeAdapter(Host.class, new ContentletDeserializer() ); }