auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); blockDrawerFromOpening(); switch (field.getFieldType()) { case SELECT: { final String screenName; final DataType dataType = field.getDataType(); if (dataType == COUNTRY) { screenName = Analytics.Screens.PROFILE_CHOOSE_LOCATION; } else if (dataType == LANGUAGE) { screenName = Analytics.Screens.PROFILE_CHOOSE_LANGUAGE; } else { screenName = Analytics.Screens.PROFILE_CHOOSE_BIRTH_YEAR; } environment.getAnalyticsRegistry().trackScreenView(screenName); break; <START> } <END> case TEXTAREA: { environment.getAnalyticsRegistry().trackScreenView(Analytics.Screens.PROFILE_EDIT_TEXT_VALUE); break; } } }</code><technical_language>a separate method get screen name dataType case statement area smaller more readable</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); blockDrawerFromOpening(); fireScreenEvent(); }
Source:
<code>public void serialize(GeometryState state, BlockBuilder out) { if (state.getGeometry() == null) { out.appendNull(); } else { <START> GeometryType.GEOMETRY.writeSlice(out, GeometrySerde.serialize(state.getGeometry())); <END> } }</code><technical_language>style: static import GeometryType.GEOMETRY, GeometrySerde.serialize GeometrySerde.deserialize</technical_language>

Target:
public void serialize(GeometryState state, BlockBuilder out) { if (state.getGeometry() == null) { out.appendNull(); } else { GEOMETRY.writeSlice(out, GeometrySerde.serialize(state.getGeometry())); } }
Source:
<code>private static boolean isUnnecessaryLambdaCast(Type childType, Type parentType) { <START> if (parentType.is(childType.fullyQualifiedName())) { <END> return true; } List<MethodJavaSymbol> childMethods = getMethodSymbolsOf(childType).collect(Collectors.toList()); return childMethods.isEmpty() || (childMethods.size() == 1 && isSingleAbstractMethodOverride(childMethods.get(0), parentType)); }</code><technical_language>I this : this tricky in case of parameterization wildcard raw type..</technical_language>

Target:
private static boolean isUnnecessaryLambdaCast(Type childType, Type parentType) { if (parentType.isSubtypeOf(childType)) { return true; } List<MethodJavaSymbol> childMethods = getMethodSymbolsOf(childType).collect(Collectors.toList()); return childMethods.isEmpty() || (childMethods.size() == 1 && isSingleAbstractMethodOverride(childMethods.get(0), parentType)); }
Source:
<code>void getFileDirectoriesWithEmptyDbParent() { BibDatabaseContext database = new BibDatabaseContext(); <START> database.setDatabasePath(Paths.get("biblio.bib")); <END> assertEquals(Collections.singletonList(currentWorkingDir), database.getFileDirectoriesAsPaths(fileDirPrefs)); }</code><technical_language>Path::of</technical_language>

Target:
void getFileDirectoriesWithEmptyDbParent() { BibDatabaseContext database = new BibDatabaseContext(); database.setDatabasePath(Path.of("biblio.bib")); assertEquals(Collections.singletonList(currentWorkingDir), database.getFileDirectoriesAsPaths(fileDirPrefs)); }
Source:
<code>public TransportMode getTransportMode() { <START> if (HTTPCommandResult.class.isAssignableFrom(this.getClass())) { <END> return TransportMode.HTTP; } throw new UnsupportedOperationException(); }</code><technical_language>This method fail if impl is HttpCommandResult, command result is abstract returned fwk. If this method in a completly valid context fail. I HTTPQuery/CommandResult remain client side. return concrete type (HTTPXXXResult) KasperClient. support other formats abstraction</technical_language>

Target:
public TransportMode getTransportMode() { if (HTTPCommandResult.class.isAssignableFrom(this.getClass())) { return TransportMode.HTTP; } return TransportMode.UNKNOWN; }
Source:
<code>public TestFactory fromUrl(String url) throws Exception { HttpJsonRequest httpJsonRequest = requestFactory.fromUrl(apiEndpointProvider.get() + "factory/resolver"); httpJsonRequest.setBody(singletonMap("url", url)); <START> HttpJsonResponse respoTestCheDefaultUserHttpJsonRequestFactorynse = httpJsonRequest.request(); <END> FactoryDto factoryDto = response.asDto(FactoryDto.class); String factoryUrl = ideUrlProvider.get() + "f?url=" + URLEncoder.encode(url, "UTF8"); return new TestFactory( factoryUrl, defaultUser, factoryDto, dashboardUrlProvider, testFactoryServiceClient, workspaceServiceClient, loginPage); }</code><technical_language>typo</technical_language>

Target:
public TestFactory fromUrl(String url) throws Exception { HttpJsonRequest httpJsonRequest = requestFactory.fromUrl(apiEndpointProvider.get() + "factory/resolver"); httpJsonRequest.setBody(singletonMap("url", url)); HttpJsonResponse response = httpJsonRequest.request(); FactoryDto factoryDto = response.asDto(FactoryDto.class); String factoryUrl = ideUrlProvider.get() + "f?url=" + URLEncoder.encode(url, "UTF8"); return new TestFactory( factoryUrl, defaultUser, factoryDto, dashboardUrlProvider, testFactoryServiceClient, workspaceServiceClient, loginPage); }
Source:
<code>public InlineByteBuddyMockMaker() { if (INITIALIZATION_ERROR != null) { throw new MockitoInitializationException(join( "Could not initialize inline Byte Buddy mock maker. (This mock maker is not supported on Android.)", <START> ToolProvider.getSystemJavaCompiler() == null ? "No JDK implementation detected, this could be a problem.\n" : "", <END> Platform.describe()), INITIALIZATION_ERROR); } bytecodeGenerator = new TypeCachingBytecodeGenerator(new InlineBytecodeGenerator(INSTRUMENTATION, mocks), true); }</code><technical_language>suggestion ToolProvider.getSystemJavaCompiler() == null ? "Are running a JRE instead of a JDK? inline mock maker needs run a JDK.\n" : "",</technical_language>

Target:
public InlineByteBuddyMockMaker() { if (INITIALIZATION_ERROR != null) { throw new MockitoInitializationException(join( "Could not initialize inline Byte Buddy mock maker. (This mock maker is not supported on Android.)", ToolProvider.getSystemJavaCompiler() == null ? "Are you running a JRE instead of a JDK? The inline mock maker needs to be run on a JDK.\n" : "", Platform.describe()), INITIALIZATION_ERROR); } bytecodeGenerator = new TypeCachingBytecodeGenerator(new InlineBytecodeGenerator(INSTRUMENTATION, mocks), true); }
Source:
<code>public static String getSafeJsBoolean(String s){ <START> if(s.equals("true") || s.equals("false") || s.equals("0") || s.equals("1")){ <END> return s; }else{ return "null"; } }</code><technical_language>BooleanUtils.toBooleanObject()</technical_language>

Target:
public static String getSafeJsBoolean(String s){ return Boolean.toString(BooleanUtils.toBooleanObject(s)); }
Source:
<code>private VirtualFile createFile(String name) { <START> VirtualFile work = vfs.resolve("/work"); <END> return work.findChild(name) .orElseThrow(() -> Exceptions.handle() .withSystemErrorMessage( "FTP Job Trigger: The virtual file with name %s could not be created", name) .handle()); }</code><technical_language>suggestion VirtualFile work = virtualFileSystem.resolve("/work");</technical_language>

Target:
private VirtualFile createFile(String name) { VirtualFile work = virtualFileSystem.resolve("/work"); return work.findChild(name) .orElseThrow(() -> Exceptions.handle() .withSystemErrorMessage( "FTP Job Trigger: The virtual file with name %s could not be created", name) .handle()); }
Source:
<code>public synchronized Pipeline createPipeline( ReplicationType type, ReplicationFactor factor) throws IOException { lock.writeLock().lock(); try { Pipeline pipeline = pipelineFactory.create(type, factor); pipelineStore.put(pipeline.getId().getProtobuf().toByteArray(), pipeline.getProtobufMessage().toByteArray()); stateManager.addPipeline(pipeline); nodeManager.addPipeline(pipeline); metrics.incNumPipelineCreated(); <START> metrics.createNumBlocksAllocatedMetric(pipeline); <END> return pipeline; } catch (InsufficientDatanodesException idEx) { throw idEx; } catch (IOException ex) { metrics.incNumPipelineCreationFailed(); throw ex; } finally { lock.writeLock().unlock(); } }</code><technical_language>line 154 155 done in state pipelineMetrics</technical_language>

Target:
public synchronized Pipeline createPipeline( ReplicationType type, ReplicationFactor factor) throws IOException { lock.writeLock().lock(); try { Pipeline pipeline = pipelineFactory.create(type, factor); pipelineStore.put(pipeline.getId().getProtobuf().toByteArray(), pipeline.getProtobufMessage().toByteArray()); stateManager.addPipeline(pipeline); nodeManager.addPipeline(pipeline); metrics.incNumPipelineCreated(); metrics.createPerPipelineMetrics(pipeline); return pipeline; } catch (InsufficientDatanodesException idEx) { throw idEx; } catch (IOException ex) { metrics.incNumPipelineCreationFailed(); throw ex; } finally { lock.writeLock().unlock(); } }
Source:
<code>public PublishingEndPoint getPublishingEndPoint(final String protocol) { if (UtilMethods.isSet(protocol)) { return null; } else if (PushPublisher.PROTOCOL_HTTP.equalsIgnoreCase(protocol) <START> || PushPublisher.PROTOCOL_HTTP.equalsIgnoreCase(protocol)) { <END> return new PushPublishingEndPoint(); } else if (AWSS3Publisher.PROTOCOL_AWS_S3.equalsIgnoreCase(protocol)) { return new AWSS3PublishingEndPoint(); } else if (StaticPublisher.PROTOCOL_STATIC.equalsIgnoreCase(protocol)) { return new StaticPublishingEndPoint(); } return null; }</code><technical_language>this for HTTP HTTPS</technical_language>

Target:
public PublishingEndPoint getPublishingEndPoint(final String protocol) { if (!UtilMethods.isSet(protocol)) { return null; } else if (PushPublisher.PROTOCOL_HTTP.equalsIgnoreCase(protocol) || PushPublisher.PROTOCOL_HTTPS.equalsIgnoreCase(protocol)) { return new PushPublishingEndPoint(); } else if (AWSS3Publisher.PROTOCOL_AWS_S3.equalsIgnoreCase(protocol)) { return new AWSS3PublishingEndPoint(); } else if (StaticPublisher.PROTOCOL_STATIC.equalsIgnoreCase(protocol)) { return new StaticPublishingEndPoint(); } return null; }
Source:
<code>public void handlePostChanged(GeoServerSecurityManager securityManager) { try { JDBCConfiguration config = getJDBCDiskQuotaConfig(); if(config != null) { Resource configFile = configDir.get("geowebcache-diskquota-jdbc.xml"); if(!Resources.exists(configFile)) { return; } JDBCConfiguration c1; InputStream is = configFile.in(); try { c1 = JDBCConfiguration.load(is); } finally { is.close(); <START> } <END> if(c1 == null || c1.getConnectionPool() == null) { return; } String originalEncrypted = c1.getConnectionPool().getPassword(); if(originalEncrypted == null) { return; } JDBCConfiguration c2 = passwordHelper.unencryptPassword(c1); JDBCConfiguration c3 = passwordHelper.encryptPassword(c2); String newEncrypted = c3.getConnectionPool().getPassword(); if(!originalEncrypted.equals(newEncrypted)) { OutputStream os = configFile.out(); try { JDBCConfiguration.store(c3, os); } finally { os.close(); } } } } catch (Exception e) { e.printStackTrace(); } }</code><technical_language>try-with-resources</technical_language>

Target:
public void handlePostChanged(GeoServerSecurityManager securityManager) { try { JDBCConfiguration config = getJDBCDiskQuotaConfig(); if(config != null) { Resource configFile = configDir.get("geowebcache-diskquota-jdbc.xml"); if(!Resources.exists(configFile)) { return; } JDBCConfiguration c1; try (InputStream is = configFile.in()) { c1 = JDBCConfiguration.load(is); } if(c1 == null || c1.getConnectionPool() == null) { return; } String originalEncrypted = c1.getConnectionPool().getPassword(); if(originalEncrypted == null) { return; } JDBCConfiguration c2 = passwordHelper.unencryptPassword(c1); JDBCConfiguration c3 = passwordHelper.encryptPassword(c2); String newEncrypted = c3.getConnectionPool().getPassword(); if(!originalEncrypted.equals(newEncrypted)) { try (OutputStream os = configFile.out()) { JDBCConfiguration.store(c3, os); } } } } catch (Exception e) { e.printStackTrace(); } }
Source:
<code>public void testFileRevisions() throws TeamException, CoreException, IOException { IProject project = createProject("testFileRevisions", new String[] { "file.txt"}); setContentsAndEnsureModified(project.getFile("file.txt"), "hi there"); commitResources(project, new String[] {"file.txt"}); setContentsAndEnsureModified(project.getFile("file.txt"), "bye there"); commitResources(project, new String[] {"file.txt"}); ICVSRemoteFile remote = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file.txt")); ILogEntry[] entries = remote.getLogEntries(DEFAULT_MONITOR); for (ILogEntry <START> entrie : <END> entries) { InputStream in = entrie.getRemoteFile().getContents(DEFAULT_MONITOR); if (entrie.getRevision().equals("1.2")) { int count = 0; byte[] buffer = new byte[1024]; int c; while((c = in.read()) != -1) { buffer[count] = (byte)c; count++; } String contents = new String(buffer, 0, count); assertEquals("the contents of revision 1.2 are not equal", contents, "hi there"); } else if (entrie.getRevision().equals("1.3")) { int count = 0; byte[] buffer = new byte[1024]; int c; while((c = in.read()) != -1) { buffer[count] = (byte)c; count++; } String contents = new String(buffer, 0, count); assertEquals("the contents of revision 1.3 are not equal", contents, "bye there"); } } }</code><technical_language>entry</technical_language>

Target:
public void testFileRevisions() throws TeamException, CoreException, IOException { IProject project = createProject("testFileRevisions", new String[] { "file.txt"}); setContentsAndEnsureModified(project.getFile("file.txt"), "hi there"); commitResources(project, new String[] {"file.txt"}); setContentsAndEnsureModified(project.getFile("file.txt"), "bye there"); commitResources(project, new String[] {"file.txt"}); ICVSRemoteFile remote = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file.txt")); ILogEntry[] entries = remote.getLogEntries(DEFAULT_MONITOR); for (ILogEntry entry : entries) { InputStream in = entry.getRemoteFile().getContents(DEFAULT_MONITOR); if (entry.getRevision().equals("1.2")) { int count = 0; byte[] buffer = new byte[1024]; int c; while((c = in.read()) != -1) { buffer[count] = (byte)c; count++; } String contents = new String(buffer, 0, count); assertEquals("the contents of revision 1.2 are not equal", contents, "hi there"); } else if (entry.getRevision().equals("1.3")) { int count = 0; byte[] buffer = new byte[1024]; int c; while((c = in.read()) != -1) { buffer[count] = (byte)c; count++; } String contents = new String(buffer, 0, count); assertEquals("the contents of revision 1.3 are not equal", contents, "bye there"); } } }
Source:
<code>private void processQuery( long lo, long limit, @Transient SqlCompiler compiler, @Transient AssociativeCache<Object> factoryCache ) throws BadProtocolException, SqlException, PeerDisconnectedException, PeerIsSlowToReadException { prepareForNewQuery(); parseQueryText(lo, limit - 1); if (SqlKeywords.isSemicolon(queryText)) { queryTag = TAG_OK; sendExecuteTail(TAIL_SUCCESS); return; } final Object statement = factoryCache.peek(queryText); if (statement == null) { final CompiledQuery cc = compiler.compile(queryText, sqlExecutionContext); <START> sqlExecutionContext.storeTelemetry(cc.getType()); <END> switch (cc.getType()) { case CompiledQuery.SELECT: final RecordCursorFactory factory = cc.getRecordCursorFactory(); factoryCache.put(queryText, factory); queryTag = TAG_SELECT; executeSelect(factory); break; case CompiledQuery.COPY_LOCAL: queryTag = TAG_COPY; sendCopyInResponse(compiler.getEngine(), cc.getTextLoader()); break; case CompiledQuery.INSERT: queryTag = TAG_INSERT; currentInsertStatement = cc.getInsertStatement(); executeInsert(); break; default: queryTag = TAG_OK; sendExecuteTail(TAIL_SUCCESS); break; } } else { if (statement instanceof RecordCursorFactory) { queryTag = TAG_SELECT; executeSelect((RecordCursorFactory) statement); } } }</code><technical_language>I hate creep scope here, super useful capture execution site, e.g. PG wire, http</technical_language>

Target:
private void processQuery( long lo, long limit, @Transient SqlCompiler compiler, @Transient AssociativeCache<Object> factoryCache ) throws BadProtocolException, SqlException, PeerDisconnectedException, PeerIsSlowToReadException { prepareForNewQuery(); parseQueryText(lo, limit - 1); if (SqlKeywords.isSemicolon(queryText)) { queryTag = TAG_OK; sendExecuteTail(TAIL_SUCCESS); return; } final Object statement = factoryCache.peek(queryText); if (statement == null) { final CompiledQuery cc = compiler.compile(queryText, sqlExecutionContext); sqlExecutionContext.storeTelemetry(cc.getType(), TelemetryOrigin.PG_WIRE); switch (cc.getType()) { case CompiledQuery.SELECT: final RecordCursorFactory factory = cc.getRecordCursorFactory(); factoryCache.put(queryText, factory); queryTag = TAG_SELECT; executeSelect(factory); break; case CompiledQuery.COPY_LOCAL: queryTag = TAG_COPY; sendCopyInResponse(compiler.getEngine(), cc.getTextLoader()); break; case CompiledQuery.INSERT: queryTag = TAG_INSERT; currentInsertStatement = cc.getInsertStatement(); executeInsert(); break; default: queryTag = TAG_OK; sendExecuteTail(TAIL_SUCCESS); break; } } else { if (statement instanceof RecordCursorFactory) { queryTag = TAG_SELECT; executeSelect((RecordCursorFactory) statement); } } }
Source:
<code>public String getOwner() { try { <START> User user = userDao.getById(context.getIdentity().getOwnerId()); <END> return user == null ? context.getIdentity().getOwnerId() : user.getName(); } catch (NotFoundException | ServerException e) { return context.getIdentity().getOwnerId(); } }</code><technical_language>throw exception instead. try do I difficult current classes hierarchy > Change meaning of a plain user name ID (opaque user), in a location is in places (even in RuntimeDto). sense. I username is a mistake done of docs lack. @gazarenkov right person is supposed there. If user id I try change run QA tests. I guess clients OK :wink:</technical_language>

Target:
public String getOwner() { return context.getIdentity().getOwnerId(); }
Source:
<code>protected void testExecute_asInstructorWithRecycleBinFlagTrue_shouldReturnAllSoftDeletedSessionsForInstructor() { InstructorAttributes instructor2OfCourse1 = typicalBundle.instructors.get("instructor2OfCourse1"); FeedbackSessionAttributes session1InCourse1 = typicalBundle.feedbackSessions.get("session1InCourse1"); loginAsInstructor(instructor2OfCourse1.googleId); String[] submissionParam = { Const.ParamsNames.IS_IN_RECYCLE_BIN, "true", Const.ParamsNames.ENTITY_TYPE, Const.EntityType.INSTRUCTOR, }; GetFeedbackSessionsAction action = getAction(submissionParam); FeedbackSessionsData fsData = (FeedbackSessionsData) getJsonResult(action).getOutput(); assertEquals(1, fsData.getFeedbackSessions().size()); FeedbackSessionData fs = fsData.getFeedbackSessions().get(0); <START> assertNotNull(fs.getDeletedAtTimestamp()); <END> assertAllInformationMatch(fs, session1InCourse1); }</code><technical_language>This assertion is necessary is tested in assertAllInformationMatch</technical_language>

Target:
protected void testExecute_asInstructorWithRecycleBinFlagTrue_shouldReturnAllSoftDeletedSessionsForInstructor() { InstructorAttributes instructor2OfCourse1 = typicalBundle.instructors.get("instructor2OfCourse1"); FeedbackSessionAttributes session1InCourse1 = typicalBundle.feedbackSessions.get("session1InCourse1"); loginAsInstructor(instructor2OfCourse1.googleId); String[] submissionParam = { Const.ParamsNames.IS_IN_RECYCLE_BIN, "true", Const.ParamsNames.ENTITY_TYPE, Const.EntityType.INSTRUCTOR, }; GetFeedbackSessionsAction action = getAction(submissionParam); FeedbackSessionsData fsData = (FeedbackSessionsData) getJsonResult(action).getOutput(); assertEquals(1, fsData.getFeedbackSessions().size()); FeedbackSessionData fs = fsData.getFeedbackSessions().get(0); assertAllInformationMatch(fs, session1InCourse1); }
Source:
<code>private void apply(PacketContext context, UUID ownerId, boolean isPortFilter, RuleResult res, int depth, List<UUID> traversedChains) { context.jlog().debug("Processing chain with name and ID {}", name, id); if (depth > 10) { throw new IllegalStateException("Deep recursion when processing " + "chain " + traversedChains.get(0)); } context.addFlowTag(flowInvTag); traversedChains.add(id); Iterator<Rule> iter = rules.iterator(); res.action = Action.CONTINUE; while (iter.hasNext() && res.action == Action.CONTINUE) { Rule r = iter.next(); r.process(context, res, ownerId, isPortFilter); if (res.action == Action.TRACE) { <START> throw new TraceRequiredException("Packet should be traced"); <END> } if (res.action == Action.JUMP) { Chain jumpChain = getJumpTarget(res.jumpToChain); if (null == jumpChain) { context.jlog().error("ignoring jump to chain : not found.", res.jumpToChain, context); res.action = Action.CONTINUE; } else if (traversedChains.contains(jumpChain.id)) { context.jlog().warn( "cannot jump from chain to chain -- already visited", this, jumpChain, context); res.action = Action.CONTINUE; } else { jumpChain.apply(context, ownerId, isPortFilter, res, depth + 1, traversedChains); if (res.action == Action.RETURN) res.action = Action.CONTINUE; } } } assert res.action != Action.JUMP; }</code><technical_language>this exception a static field somewhere, exception overriding fillInStackTrace capture a stack trace? message is needed</technical_language>

Target:
private void apply(PacketContext context, UUID ownerId, boolean isPortFilter, RuleResult res, int depth, List<UUID> traversedChains) { context.jlog().debug("Processing chain with name and ID {}", name, id); if (depth > 10) { throw new IllegalStateException("Deep recursion when processing " + "chain " + traversedChains.get(0)); } context.addFlowTag(flowInvTag); traversedChains.add(id); Iterator<Rule> iter = rules.iterator(); res.action = Action.CONTINUE; while (iter.hasNext() && res.action == Action.CONTINUE) { Rule r = iter.next(); r.process(context, res, ownerId, isPortFilter); if (res.action == Action.TRACE) { throw TraceRequiredException.instance(); } if (res.action == Action.JUMP) { Chain jumpChain = getJumpTarget(res.jumpToChain); if (null == jumpChain) { context.jlog().error("ignoring jump to chain : not found.", res.jumpToChain, context); res.action = Action.CONTINUE; } else if (traversedChains.contains(jumpChain.id)) { context.jlog().warn( "cannot jump from chain to chain -- already visited", this, jumpChain, context); res.action = Action.CONTINUE; } else { jumpChain.apply(context, ownerId, isPortFilter, res, depth + 1, traversedChains); if (res.action == Action.RETURN) res.action = Action.CONTINUE; } } } assert res.action != Action.JUMP; }
Source:
<code>public void downloadAllServerChanges_throwsOnUiThread() throws InterruptedException { SyncUser user = createTestUser(); Realm realm = Realm.getInstance(configuration); try { <START> SyncManager.getSession(configuration).downloadAllServerChanges(); <END> } catch (IllegalStateException ignored) { } finally { realm.close(); } }</code><technical_language>Assertion missing</technical_language>

Target:
public void downloadAllServerChanges_throwsOnUiThread() throws InterruptedException { Realm realm = Realm.getInstance(configuration); try { SyncManager.getSession(configuration).downloadAllServerChanges(); fail("Should throw an IllegalStateException on Ui Thread"); } catch (IllegalStateException ignored) { } finally { realm.close(); } }
Source:
<code><START> public DeploymentConfiguration createPropertyDeploymentConfiguration( <END> Class<?> systemPropertyBaseClass, VaadinConfig vaadinConfig) throws VaadinConfigurationException { return new PropertyDeploymentConfiguration( ApplicationConfiguration.get(vaadinConfig.getVaadinContext()), systemPropertyBaseClass, createInitParameters(systemPropertyBaseClass, vaadinConfig)); }</code><technical_language>I if static methods left deprecated in case is those. I if is a case in application developer's code this fine. another mention in list of breaking changes enough</technical_language>

Target:
public DeploymentConfiguration createPropertyDeploymentConfiguration( Class<?> systemPropertyBaseClass, VaadinConfig vaadinConfig) { return new PropertyDeploymentConfiguration( ApplicationConfiguration.get(vaadinConfig.getVaadinContext()), systemPropertyBaseClass, createInitParameters(systemPropertyBaseClass, vaadinConfig)); }
Source:
<code>public LoginContext login() throws LoginException { String jaasConfigFile = System.getProperty(JAAS_CONFIG_SYSTEM_PROPERTY); if (jaasConfigFile == null) { <START> log.debug("System property " + JAAS_CONFIG_SYSTEM_PROPERTY + " for jaas config file is not set, using default JAAS configuration."); <END> } loginContext = new LoginContext(loginContextName, new LoginCallbackHandler()); loginContext.login(); log.info("Successfully logged in."); return loginContext; }</code><technical_language>throw error atleast log this info/error level</technical_language>

Target:
public LoginContext login() throws LoginException { String jaasConfigFile = System.getProperty(JAAS_CONFIG_SYSTEM_PROPERTY); if (jaasConfigFile == null) { log.error("System property " + JAAS_CONFIG_SYSTEM_PROPERTY + " for jaas config file is not set, using default JAAS configuration."); } loginContext = new LoginContext(loginContextName, new LoginCallbackHandler()); loginContext.login(); log.info("Successfully logged in."); return loginContext; }
Source:
<code><START> protected synchronized void cacheNewValue(final K key, final V newValue) { <END> notNull(newValue); final V nullableOldValue = cache.getIfPresent(key); LOGGER.trace("Caching value={} for {}", newValue, key); cache.put(key, newValue); if (nullableOldValue != null) { final V oldValue = nullableOldValue; if (!java.util.Objects.equals(newValue, oldValue)) { LOGGER.info("The value for was updated from to {}", key, oldValue, newValue); } } else { LOGGER.debug("Polled for the first time. Found that the value is {}", key, newValue); } }</code><technical_language>handleTimeout() handleException() called a single thread sequentially, this method needs synchronized</technical_language>

Target:
protected void cacheNewValue(final K key, final V newValue) { notNull(newValue); final V nullableOldValue = cache.getIfPresent(key); LOGGER.trace("Caching value={} for {}", newValue, key); cache.put(key, newValue); if (nullableOldValue != null) { final V oldValue = nullableOldValue; if (!java.util.Objects.equals(newValue, oldValue)) { LOGGER.info("The value for was updated from to {}", key, oldValue, newValue); } } else { LOGGER.debug("Polled for the first time. Found that the value is {}", key, newValue); } }
Source:
<code>public void contextInitialized(ServletContextEvent event) { ServletContext ctx = event.getServletContext(); SSOLocalConfig localConfig = new SSOLocalConfig(); ctx.setAttribute(SSOUtils.EXTENSION_MANAGER, new SSOExtensionsManager(localConfig)); ctx.setAttribute(SSOUtils.USER_GROUP_MANAGER, new SSOUserGroupManager()); ctx.setAttribute(SSOUtils.SSO_LOCAL_CONFIG, localConfig); ctx.setAttribute(SSOUtils.SSO_PROFILES, AuthenticationUtils.getAvailableProfiles(ctx)); boolean enableBasicAuth = false; <START> String strVal = ctx.getInitParameter("enable-basic-auth"); <END> if (StringUtils.isNotEmpty(strVal)) { enableBasicAuth = Boolean.parseBoolean(strVal); } ctx.setAttribute(SSOUtils.ENABLE_BASIC_AUTH, enableBasicAuth); }</code><technical_language>need parameters: 1. if external authentication, redirect external url, this externally set. default: 2. if want accept basic authorization headers all. default: yes. 3. if want activate basic authorization servlet prompt for credentials not. default: no. default prompt for basic credentials accept if apache is configured so</technical_language>

Target:
public void contextInitialized(ServletContextEvent event) { ServletContext ctx = event.getServletContext(); SSOLocalConfig localConfig = new SSOLocalConfig(); ctx.setAttribute(SSOUtils.EXTENSION_MANAGER, new SSOExtensionsManager(localConfig)); ctx.setAttribute(SSOUtils.USER_GROUP_MANAGER, new SSOUserGroupManager()); ctx.setAttribute(SSOUtils.SSO_LOCAL_CONFIG, localConfig); ctx.setAttribute(SSOUtils.SSO_PROFILES, AuthenticationUtils.getAvailableProfiles(ctx)); ctx.setAttribute(SSOUtils.ACCEPT_BASIC_AUTH_HEADERS, getBooleanInitParam(ctx, SSOUtils.ACCEPT_BASIC_AUTH_HEADERS)); ctx.setAttribute(SSOUtils.ENABLE_BASIC_AUTH, getBooleanInitParam(ctx, SSOUtils.ENABLE_BASIC_AUTH)); ctx.setAttribute(SSOUtils.ENABLE_EXTERNAL_AUTH, getBooleanInitParam(ctx, SSOUtils.ENABLE_EXTERNAL_AUTH)); }
Source:
<code>private void setSummaryText(int failingCount, int pendingCount, int successCount) { String failingText = failingCount > 0 ? getContext().getString(R.string.check_failing, failingCount) : ""; if (failingCount > 0 && pendingCount > 0) { failingText += ", "; } String pendingText = pendingCount > 0 ? getContext().getString(R.string.check_pending, pendingCount) : ""; if ((failingCount > 0 || pendingCount > 0) && successCount > 0) { pendingText += ", "; } String successfulText = successCount > 0 ? getContext().getString(R.string.check_successful, successCount) <START> : ""; <END> int sumCount = pendingCount + failingCount + successCount; mSummaryTextView.setText(getResources().getQuantityString(R.plurals.checks_summary, sumCount, failingText, pendingText, successfulText)); }</code><technical_language>This overkill, this suited for ArrayList + TextUtils.join()</technical_language>

Target:
private void setSummaryText(int failingCount, int pendingCount, int successCount) { ArrayList<String> summaryList = new ArrayList<>(); if (failingCount > 0) { summaryList.add(getContext().getString(R.string.check_failing, failingCount)); } if (pendingCount > 0) { summaryList.add(getContext().getString(R.string.check_pending, pendingCount)); } if (successCount > 0) { summaryList.add(getContext().getString(R.string.check_successful, successCount)); } String summary = TextUtils.join(", ", summaryList); int sumCount = pendingCount + failingCount + successCount; mSummaryTextView.setText(getResources().getQuantityString(R.plurals.checks_summary, sumCount, summary)); }
Source:
<code>private ProjectName( final String value ) { Preconditions.checkNotNull( value, "Project name cannot be null" ); Preconditions.checkArgument( !value.trim().isEmpty(), "Project name cannot be blank" ); <START> Preconditions.checkArgument( value.matches( "^" + VALID_PROJECT_NAME_REGEX + "$" ), "Project name format incorrect: " + value ); <END> this.value = value; }</code><technical_language>@vbradnitski Pattern.compile matches</technical_language>

Target:
private ProjectName( final String value ) { Preconditions.checkNotNull( value, "Project name cannot be null" ); Preconditions.checkArgument( !value.trim().isEmpty(), "Project name cannot be blank" ); Preconditions.checkArgument( VALID_PROJECT_NAME_PATTERN.matcher( value ).matches(), "Project name format incorrect: " + value ); this.value = value; }
Source:
<code><START> private void setLayoutRestrictions(boolean allowUpDownButtons, boolean allowScrollThumb, <END> boolean allowAlphaJump) { ImageView upButton = mPagedListView.findViewById(R.id.page_up); ImageView downButton = mPagedListView.findViewById(R.id.page_down); Button alphaJump = mPagedListView.findViewById(R.id.alpha_jump); View scrollThumb = mPagedListView.findViewById(R.id.scrollbar_thumb); View scrollBarView = mPagedListView.findViewById(R.id.paged_scroll_view); ViewGroup.LayoutParams params = scrollBarView.getLayoutParams(); int seperateMargin = mPagedListView.getContext().getResources() .getDimensionPixelSize(androidx.car.R.dimen.car_padding_4); int restrictedHeight = mPagedListView.getPaddingTop() + upButton.getHeight() + downButton.getHeight() + mPagedListView.getPaddingBottom() + seperateMargin; if (allowUpDownButtons) { restrictedHeight += scrollThumb.getHeight() + seperateMargin; } if (allowScrollThumb) { restrictedHeight += alphaJump.getHeight() + seperateMargin; } if (!(allowUpDownButtons & allowScrollThumb & allowAlphaJump)) { restrictedHeight += -1; } params.height = restrictedHeight; try { mActivityRule.runOnUiThread(() -> scrollBarView.requestLayout()); } catch (Throwable throwable) { throwable.printStackTrace(); throw new RuntimeException(throwable); } }</code><technical_language>Ok I thought this some more. I more sense this method parameters allow thumb alpha jump. in test testing up/down buttons show, do setup for layout. more verbose in tests. reason is if pass "false" for up/down button "true" for other parameters, show anything. Meaning this method respect values of parameters. If up/down buttons show, show. suggest making: void setLayoutRestrictions(boolean allowScrollThumb, boolean allowAlphaJump);</technical_language>

Target:
private void setLayoutRestrictions(boolean allowUpDownButtons, boolean allowScrollThumb, boolean allowAlphaJump) { ImageView upButton = mPagedListView.findViewById(R.id.page_up); ImageView downButton = mPagedListView.findViewById(R.id.page_down); Button alphaJump = mPagedListView.findViewById(R.id.alpha_jump); View scrollThumb = mPagedListView.findViewById(R.id.scrollbar_thumb); View scrollBarView = mPagedListView.findViewById(R.id.paged_scroll_view); ViewGroup.LayoutParams params = scrollBarView.getLayoutParams(); int seperateMargin = mPagedListView.getContext().getResources() .getDimensionPixelSize(androidx.car.R.dimen.car_padding_4); int restrictedHeight = 0; if (allowUpDownButtons) { restrictedHeight += mPagedListView.getPaddingTop() + upButton.getHeight() + downButton.getHeight() + mPagedListView.getPaddingBottom() + seperateMargin; } if (allowScrollThumb) { restrictedHeight += scrollThumb.getHeight() + seperateMargin; } if (allowAlphaJump) { restrictedHeight += alphaJump.getHeight() + seperateMargin; } params.height = restrictedHeight; try { mActivityRule.runOnUiThread(() -> scrollBarView.requestLayout()); } catch (Throwable throwable) { throwable.printStackTrace(); throw new RuntimeException(throwable); } }
Source:
<code>public void waitForValueToBePresentInElementsAttributeByCss(String selector, String attribute, String value) { changeImplicitWait(250, TimeUnit.MILLISECONDS); try { waitFor.until(CommonExpectedConditions.valueToBePresentInElementsAttribute( <START> By.cssSelector(selector), attribute, escapeHtml(value))); <END> } finally { restoreDeaultImplicitWait(); } }</code><technical_language>I escape this level, explicitly escape title of a video passing a method, in here. move verifyVideoAdded(String videoTitle) in SpecialVideosPageObject</technical_language>

Target:
public void waitForValueToBePresentInElementsAttributeByCss(String selector, String attribute, String value) { changeImplicitWait(250, TimeUnit.MILLISECONDS); try { waitFor.until(CommonExpectedConditions.valueToBePresentInElementsAttribute( By.cssSelector(selector), attribute, value)); } finally { restoreDeaultImplicitWait(); } }
Source:
<code>private boolean isIgnored(List<DataManipulator<?, ?>> list, DataManipulator<?, ?> toCheck) { <START> for (Class<? extends DataManipulator<?, ?>> ignore : ignored) { <END> if (ignore.isAssignableFrom(toCheck.getClass())) { list.removeIf(manip -> ignore.isAssignableFrom(manip.getClass())); return true; } } return false; }</code><technical_language>this</technical_language>

Target:
private boolean isIgnored(List<DataManipulator<?, ?>> list, DataManipulator<?, ?> toCheck) { for (Class<? extends DataManipulator<?, ?>> ignore : this.ignored) { if (ignore.isAssignableFrom(toCheck.getClass())) { list.removeIf(manip -> ignore.isAssignableFrom(manip.getClass())); return true; } } return false; }
Source:
<code><START> public static synchronized void setField(Object target, Field field, Object value) { <END> AccessibilityChanger changer = new AccessibilityChanger(); changer.enableAccess(field); try { field.set(target, value); } catch (IllegalAccessException e) { throw new RuntimeException("Access not authorized on field '" + field + "' of object '" + target + "' with value: '" + value + "'", e); } catch (IllegalArgumentException e) { throw new RuntimeException("Wrong argument on field '" + field + "' of object '" + target + "' with value: '" + value + "', \n" + "reason : " + e.getMessage(), e); } changer.safelyDisableAccess(field); }</code><technical_language>underlying block synchronized method ? Is needed</technical_language>

Target:
public static void setField(Object target, Field field, Object value) { AccessibilityChanger changer = new AccessibilityChanger(); changer.enableAccess(field); try { field.set(target, value); } catch (IllegalAccessException e) { throw new RuntimeException("Access not authorized on field '" + field + "' of object '" + target + "'" + " with value: '" + value + "'", e); } catch (IllegalArgumentException e) { throw new RuntimeException("Wrong argument on field '" + field + "' of object '" + target + "' with " + "value: '" + value + "', \n" + "reason : " + e.getMessage(), e); } finally { changer.safelyDisableAccess(field); } }
Source:
<code>public MyqDeviceData getMyqData() throws InvalidLoginException, IOException { <START> logger.trace("Retreiveing door data"); <END> String url = String.format( "%s/api/v4/userdevicedetails/get?appId=%s&SecurityToken=%s", websiteUrl, enc(appId), enc(getSecurityToken())); JsonNode data = request("GET", url, null, null, true); return new MyqDeviceData(data); }</code><technical_language>"Retrieving"</technical_language>

Target:
public MyqDeviceData getMyqData() throws InvalidLoginException, IOException { logger.trace("Retrieving door data"); String url = String.format( "%s/api/v4/userdevicedetails/get?appId=%s&SecurityToken=%s", websiteUrl, enc(appId), enc(getSecurityToken())); JsonNode data = request("GET", url, null, null, true); return new MyqDeviceData(data); }
Source:
<code>boolean isBitrateImproving(int newBitrateBps) { synchronized (critSect) { boolean initialProbe = !remoteRate.isValidEstimate() && newBitrateBps > 0; boolean bitrateAboveEstimate = remoteRate.isValidEstimate() && newBitrateBps > (int) (remoteRate .getLatestEstimate()); <START> return initialProbe || bitrateAboveEstimate; <END> } }</code><technical_language>worst happen is values in log message precise</technical_language>

Target:
private boolean isBitrateImproving(int newBitrateBps) { synchronized (critSect) { boolean initialProbe = !remoteRate.isValidEstimate() && newBitrateBps > 0; boolean bitrateAboveEstimate = remoteRate.isValidEstimate() && newBitrateBps > (int) (remoteRate .getLatestEstimate()); return initialProbe || bitrateAboveEstimate; } }
Source:
<code>private void relocateHashAdders(){ final Set<JsonObject> hashAdders = new HashSet<>(); GraphUtilities.visitOnce(GraphUtilities.findStarts(graph), new HashSet<BVirtualMarker>(), graph, <START> new Consumer<JsonObject>(){ <END> public void accept(JsonObject op) { if(jstring(op, "kind").equals("com.ibm.streamsx.topology.functional.java::HashAdder")){ hashAdders.add(op); } } }); for(JsonObject hashAdder : hashAdders){ relocateHashAdder(hashAdder); } }</code><technical_language>a lambda expression anonymous class</technical_language>

Target:
private void relocateHashAdders(){ final Set<JsonObject> hashAdders = new HashSet<>(); GraphUtilities.visitOnce(GraphUtilities.findStarts(graph), new HashSet<BVirtualMarker>(), graph, (JsonObject op) -> { if (GraphUtilities.isHashAdder(op)) { hashAdders.add(op); } } ); for(JsonObject hashAdder : hashAdders){ relocateHashAdder(hashAdder); } }
Source:
<code>public byte[] sign(PublicKey key, byte[] data) throws IOException { byte cmd = SshAgentConstants.SSH2_AGENTC_SIGN_REQUEST; byte okcmd = SshAgentConstants.SSH2_AGENT_SIGN_RESPONSE; <START> if (FactoryManager.AGENT_FORWARDING_TYPE_IETF.equals(channelType)) { <END> cmd = SshAgentConstants.SSH_AGENT_PRIVATE_KEY_OP; okcmd = SshAgentConstants.SSH_AGENT_OPERATION_COMPLETE; } Buffer buffer = createBuffer(cmd); if (FactoryManager.AGENT_FORWARDING_TYPE_IETF.equals(channelType)) { buffer.putString("sign"); } buffer.putPublicKey(key); buffer.putBytes(data); buffer.putInt(0); buffer = request(prepare(buffer)); int responseType = buffer.getUByte(); if (responseType != okcmd) { throw new SshException("Bad signing response type: " + SshAgentConstants.getCommandMessageName(responseType)); } byte[] signature = null; if (FactoryManager.AGENT_FORWARDING_TYPE_IETF.equals(channelType)) { signature = buffer.getBytes(); if (log.isDebugEnabled()) { log.debug("sign({})[{}] : {}", KeyUtils.getKeyType(key), KeyUtils.getFingerPrint(key), BufferUtils.toHex(':', signature)); } } else { Buffer buf = new ByteArrayBuffer(buffer.getBytes()); String algorithm = buf.getString(); signature = buf.getBytes(); if (log.isDebugEnabled()) { log.debug("sign({})[{}] {}: {}", KeyUtils.getKeyType(key), KeyUtils.getFingerPrint(key), algorithm, BufferUtils.toHex(':', signature)); } } return signature; }</code><technical_language>_int_ allow for values > 127</technical_language>

Target:
public byte[] sign(PublicKey key, byte[] data) throws IOException { int cmd = SshAgentConstants.SSH2_AGENTC_SIGN_REQUEST; int okcmd = SshAgentConstants.SSH2_AGENT_SIGN_RESPONSE; if (FactoryManager.AGENT_FORWARDING_TYPE_IETF.equals(channelType)) { cmd = SshAgentConstants.SSH_AGENT_PRIVATE_KEY_OP; okcmd = SshAgentConstants.SSH_AGENT_OPERATION_COMPLETE; } Buffer buffer = createBuffer((byte) cmd); if (FactoryManager.AGENT_FORWARDING_TYPE_IETF.equals(channelType)) { buffer.putString("sign"); } buffer.putPublicKey(key); buffer.putBytes(data); buffer.putInt(0); buffer = request(prepare(buffer)); int responseType = buffer.getUByte(); if (responseType != okcmd) { throw new SshException("Bad signing response type: " + SshAgentConstants.getCommandMessageName(responseType)); } byte[] signature = buffer.getBytes(); if (FactoryManager.AGENT_FORWARDING_TYPE_IETF.equals(channelType)) { if (log.isDebugEnabled()) { log.debug("sign({})[{}] : {}", KeyUtils.getKeyType(key), KeyUtils.getFingerPrint(key), BufferUtils.toHex(':', signature)); } } else { Buffer buf = new ByteArrayBuffer(signature); String algorithm = buf.getString(); signature = buf.getBytes(); if (log.isDebugEnabled()) { log.debug("sign({})[{}] {}: {}", KeyUtils.getKeyType(key), KeyUtils.getFingerPrint(key), algorithm, BufferUtils.toHex(':', signature)); } } return signature; }
Source:
<code>public void shouldSaveCondition() { CodedOrFreeText codedOrFreeText = new CodedOrFreeText(new Concept(4), new ConceptName(5089), "non coded"); ConditionClinicalStatus clinicalStatus = ConditionClinicalStatus.ACTIVE; ConditionVerificationStatus verificationStatus = ConditionVerificationStatus.CONFIRMED; Patient patient = new Patient(2); Date onsetDate = new Date(); Date endDate = new Date(); Condition previousVersion = dao.getConditionByUuid("2cc6880e-2c46-15e4-9038-a6c5e4d22fb7"); String additionalDetail = "additionalDetail"; Condition condition = new Condition(); condition.setConditionId(20); condition.setCondition(codedOrFreeText); condition.setClinicalStatus(clinicalStatus); condition.setVerificationStatus(verificationStatus); condition.setPreviousVersion(previousVersion); condition.setAdditionalDetail(additionalDetail); condition.setOnsetDate(onsetDate); condition.setEndDate(endDate); condition.setPatient(patient); Condition savedCondition = dao.saveCondition(condition); assertEquals(additionalDetail, savedCondition.getAdditionalDetail()); <START> assertEquals(20, (int) savedCondition.getConditionId()); <END> assertEquals(onsetDate, (Date) savedCondition.getOnsetDate()); assertEquals(endDate, savedCondition.getEndDate()); assertEquals(clinicalStatus, savedCondition.getClinicalStatus()); assertEquals(verificationStatus, savedCondition.getVerificationStatus()); assertEquals(previousVersion, (Condition) savedCondition.getPreviousVersion()); assertEquals(patient, (Patient) savedCondition.getPatient()); }</code><technical_language>Assert values set. database generated id</technical_language>

Target:
public void shouldSaveCondition() { CodedOrFreeText codedOrFreeText = new CodedOrFreeText(new Concept(4), new ConceptName(5089), "non coded"); ConditionClinicalStatus clinicalStatus = ConditionClinicalStatus.ACTIVE; ConditionVerificationStatus verificationStatus = ConditionVerificationStatus.CONFIRMED; Patient patient = new Patient(2); Date onsetDate = new Date(); Date endDate = new Date(); Condition previousVersion = dao.getConditionByUuid("2cc6880e-2c46-15e4-9038-a6c5e4d22fb7"); String additionalDetail = "additionalDetail"; int conditionId = 20; Condition condition = new Condition(); condition.setConditionId(conditionId); condition.setCondition(codedOrFreeText); condition.setClinicalStatus(clinicalStatus); condition.setVerificationStatus(verificationStatus); condition.setPreviousVersion(previousVersion); condition.setAdditionalDetail(additionalDetail); condition.setOnsetDate(onsetDate); condition.setEndDate(endDate); condition.setPatient(patient); dao.saveCondition(condition); Condition savedCondition = dao.getCondition(conditionId); assertEquals(additionalDetail, savedCondition.getAdditionalDetail()); assertEquals(conditionId, (int) savedCondition.getConditionId()); assertEquals(onsetDate, savedCondition.getOnsetDate()); assertEquals(endDate, savedCondition.getEndDate()); assertEquals(clinicalStatus, savedCondition.getClinicalStatus()); assertEquals(verificationStatus, savedCondition.getVerificationStatus()); assertEquals(previousVersion, savedCondition.getPreviousVersion()); assertEquals(patient, savedCondition.getPatient()); }
Source:
<code>public static List<Technology> sortTechnologies(List<Technology> techList, TechnologyOrderOptionEnum orderBy) { switch (orderBy) { <START> case POSITIVE_RECOMMENDATION_AMOUNT: <END> Collections.sort(techList, new Comparator<Technology>() { @Override public int compare(Technology counter1, Technology counter2) { return Integer.compare(counter2.getPositiveRecommendationsCounter(), counter1.getPositiveRecommendationsCounter()); } }); break; case NEGATIVE_RECOMMENDATION_AMOUNT: Collections.sort(techList, new Comparator<Technology>() { @Override public int compare(Technology counter1, Technology counter2) { return Integer.compare(counter2.getNegativeRecommendationsCounter(), counter1.getNegativeRecommendationsCounter()); } }); break; case COMMENT_AMOUNT: Collections.sort(techList, new Comparator<Technology>() { @Override public int compare(Technology counter1, Technology counter2) { return Integer.compare(counter2.getCommentariesCounter(), counter1.getCommentariesCounter()); } }); break; case ENDORSEMENT_AMOUNT: Collections.sort(techList, new Comparator<Technology>() { @Override public int compare(Technology counter1, Technology counter2) { return Integer.compare(counter2.getEndorsersCounter(), counter1.getEndorsersCounter()); } }); break; case APHABETIC: Collections.sort(techList, new Comparator<Technology>() { @Override public int compare(Technology counter1, Technology counter2) { return counter1.getName().compareTo(counter2.getName()); } }); break; default: break; } return techList; }</code><technical_language>@tsr-thulio Please show @felipeaziz do enum abstract method</technical_language>

Target:
public static List<Technology> sortTechnologies(List<Technology> techList, TechnologyOrderOptionEnum orderBy) { orderBy.sort(techList); return techList; }
Source:
<code>private URI createEntitiesResponseUri() { <START> return ServletUriComponentsBuilder.fromCurrentRequest().build().toUri(); <END> }</code><technical_language>Test data shows encoding issues. Possibly .build(true) helps (might side effects)</technical_language>

Target:
private URI createEntitiesResponseUri() { return createEntitiesResponseUri(null); }
Source:
<code>public void queryStopped() { <START> runningQueries.decrementAndGet(); <END> queuedQueries.decrementAndGet(); }</code><technical_language>decrementing queuedQueries twice? query get queued (queryQueued get called), query start running (queryStarted called decrements), query finish (queryStopped get called decrements), right</technical_language>

Target:
public void queryStopped() { runningQueries.decrementAndGet(); }