auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setAttribute(final String key, final Object value) { super.setAttribute(key, value); if (key.equals(SORT_ORDER_TAG) || key.equals(GROUP_ORDER_TAG)) { this.setAttribute(key, value.toString()); } else { <START> super.setAttribute(key, value); <END> } }</code><technical_language>This is calling super.setAttribute() is intentional</technical_language>

Target:
public void setAttribute(final String key, final Object value) { if (key.equals(SORT_ORDER_TAG) || key.equals(GROUP_ORDER_TAG)) { this.setAttribute(key, value.toString()); } else { super.setAttribute(key, value); } }
Source:
<code>public <T> void onProvision(ProvisionInvocation<T> provision) { <START> SingletonScopeInjectorProvider.setCurrentInjector(this.injector); <END> final T injectee = provision.provision(); if (injectee == null) { return; } if (injectee instanceof LifecycleListener) { if (manager == null) { pendingLifecycleListeners.add((LifecycleListener) injectee); } else { manager.addListener((LifecycleListener) injectee); } } }</code><technical_language>Rename setIfAbsent</technical_language>

Target:
public <T> void onProvision(ProvisionInvocation<T> provision) { SingletonScopeInjectorProvider.setCurrentInjectorIfAbsent(this.injector); final T injectee = provision.provision(); if (injectee == null) { return; } if (injectee instanceof LifecycleListener) { if (manager == null) { pendingLifecycleListeners.add((LifecycleListener) injectee); } else { manager.addListener((LifecycleListener) injectee); } } }
Source:
<code>private static void logCreateEntitlementWithAOs(final StringBuilder logLine, final String externalKey, final Iterable<EntitlementSpecifier> entitlementSpecifiers, final LocalDate entitlementDate, final LocalDate billingDate) { if (externalKey != null) { <START> logLine.append("bundle key='") <END> .append(externalKey) .append("'"); } if (entitlementDate != null) { if (externalKey != null) { logLine.append(", "); } logLine.append("entDate='") .append(entitlementDate) .append("'"); } if (billingDate != null) { if (externalKey != null || entitlementDate != null) { logLine.append(", "); } logLine.append("billDate='") .append(billingDate) .append("'"); } if (entitlementSpecifiers != null && entitlementSpecifiers.iterator().hasNext()) { if (externalKey != null || entitlementDate != null || billingDate != null) { logLine.append(", "); } logEntitlementSpecifier(logLine, entitlementSpecifiers); } }</code><technical_language>bundleKey bundleExternalKey (no space)</technical_language>

Target:
private static void logCreateEntitlementWithAOs(final StringBuilder logLine, final String externalKey, final Iterable<EntitlementSpecifier> entitlementSpecifiers, final LocalDate entitlementDate, final LocalDate billingDate) { if (externalKey != null) { logLine.append("bundleKey='") .append(externalKey) .append("'"); } if (entitlementDate != null) { if (externalKey != null) { logLine.append(", "); } logLine.append("entDate='") .append(entitlementDate) .append("'"); } if (billingDate != null) { if (externalKey != null || entitlementDate != null) { logLine.append(", "); } logLine.append("billDate='") .append(billingDate) .append("'"); } if (entitlementSpecifiers != null && entitlementSpecifiers.iterator().hasNext()) { if (externalKey != null || entitlementDate != null || billingDate != null) { logLine.append(", "); } logEntitlementSpecifier(logLine, entitlementSpecifiers); } }
Source:
<code>public SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment) { super(); <START> if (dataSource == null) { <END> throw new IllegalArgumentException("Data source must not be null."); } if (lobHandler == null) { throw new IllegalArgumentException("LOB handler must not be null."); } if (StringUtils.isBlank(tableName)) { throw new IllegalArgumentException("Table name must not be null or empty."); } if (StringUtils.isBlank(environment)) { throw new IllegalArgumentException("Environment must not be null or empty."); } this.onlyNamesRowMapper = new OnlyNamesRowMapper(); this.fullRowMapper = new SamlClientConfigurationRowMapper(lobHandler); this.template = new JdbcTemplate(dataSource); this.environment = environment; this.selectAllNamesSqlText = String.format(SELECT_ALL_NAMES_SQL_TEXT, tableName); this.selectAllClientsSqlText = String.format(SELECT_ALL_CLIENTS_SQL_TEXT, tableName); this.selectSingleClientSqlText = String.format(SELECT_SINGLE_CLIENT_SQL_TEXT, tableName); this.selectAllNamesParameters = new Object[] {environment}; this.selectAllClientsParameters = new Object[] {environment}; this.selectAllNamesParameterTypes = new int[] {Types.VARCHAR}; this.selectAllClientsParameterTypes = new int[] {Types.VARCHAR}; this.selectSingleClientParameterTypes = new int[] {Types.VARCHAR, Types.VARCHAR}; }</code><technical_language>CommonHelper.assertNotNull</technical_language>

Target:
public SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment) { super(); CommonHelper.assertNotNull("dataSource", dataSource); CommonHelper.assertNotNull("lobHandler", lobHandler); CommonHelper.assertNotBlank("tableName", tableName); CommonHelper.assertNotBlank("environment", environment); this.onlyNamesRowMapper = new OnlyNamesRowMapper(); this.fullRowMapper = new SamlClientConfigurationRowMapper(lobHandler); this.template = new JdbcTemplate(dataSource); this.environment = environment; this.selectAllNamesSqlText = String.format(SELECT_ALL_NAMES_SQL_TEXT, tableName); this.selectAllClientsSqlText = String.format(SELECT_ALL_CLIENTS_SQL_TEXT, tableName); this.selectSingleClientSqlText = String.format(SELECT_SINGLE_CLIENT_SQL_TEXT, tableName); this.selectAllNamesParameters = new Object[] {environment}; this.selectAllClientsParameters = new Object[] {environment}; this.selectAllNamesParameterTypes = new int[] {Types.VARCHAR}; this.selectAllClientsParameterTypes = new int[] {Types.VARCHAR}; this.selectSingleClientParameterTypes = new int[] {Types.VARCHAR, Types.VARCHAR}; }
Source:
<code><START> public BaseResponseDto getReferrerStatistics(@RequestBody BaseParamDto paramDto){ <END> return mobileAppReferrerStatisticsService.getReferrerStatistics(paramDto); }</code><technical_language>requestDto.getBaseParam().setUserId(getLoginName());</technical_language>

Target:
public BaseResponseDto getReferrerStatistics(@RequestBody BaseParamDto paramDto){ paramDto.getBaseParam().setUserId(getLoginName()); return mobileAppReferrerStatisticsService.getReferrerStatistics(paramDto); }
Source:
<code>public void revokeAccessTokens(String id, String token) { AccessToken accessToken = new AccessToken.Builder(token).build(); try { connector.revokeAllAccessTokens(id, accessToken); } catch (ConnectionInitializationException e) { LOGGER.warn(String.format("Unable to revoke access token on auth-server %s: %s", authServerHome, e.getMessage())); throw e; } catch(OsiamRequestException e) { <START> LOGGER.warn("Error when revoking all access tokens", e); <END> throw e; } }</code><technical_language>'when' dropped log statement</technical_language>

Target:
public void revokeAccessTokens(String id, String token) { AccessToken accessToken = new AccessToken.Builder(token).build(); try { connector.revokeAllAccessTokens(id, accessToken); } catch (ConnectionInitializationException e) { LOGGER.warn(String.format("Unable to revoke access token on auth-server %s: %s", authServerHome, e.getMessage())); throw e; } catch(OsiamRequestException e) { LOGGER.warn("Error revoking all access tokens", e); throw e; } }
Source:
<code>static String trimTrailingWhitespaces(String s) { if (hasLength(s) == false) { return s; } <START> int endIdx = -1; for (int i = s.length() - 1; (i >= 0) && (endIdx < 0); i--) { if (Character.isWhitespace(s.charAt(i)) == false) { endIdx = i; } } if (endIdx < 0) { return EMPTY; } return s.substring(0, endIdx + 1); <END> }</code><technical_language>Nit: more compact alternative. int i = s.length() - 1; while (i >= 0 && Character.isWhitespace(s.charAt(i))) { i --; } return s.substring(0, i + 1); Similar for treamLeading</technical_language>

Target:
static String trimTrailingWhitespaces(String s) { if (hasLength(s) == false) { return s; } int i = s.length() - 1; while (i >= 0 && Character.isWhitespace(s.charAt(i))) { i--; } return s.substring(0, i + 1); }
Source:
<code>private CompletableFuture<CallFilteringResult> scheduleFilter(CallFilter filter, BlockingQueue<CallFilter> filtersQueue) { CallFilteringResult result = new CallFilteringResult.Builder() .setShouldAllowCall(true) .setShouldReject(false) .setShouldSilence(false) .setShouldAddToCallLog(true) .setShouldShowNotification(true) .setCall(mCall) .build(); for (CallFilter dependencyFilter : filter.getDependencies()) { result = result.combine(mResults.get(dependencyFilter)); } final CallFilteringResult <START> input = <END> result; CompletableFuture<CallFilteringResult> startFuture = CompletableFuture.supplyAsync(() -> input); PostFilterTask postFilterTask = new PostFilterTask(filter, filtersQueue, mResults); CompletableFuture<CallFilteringResult> future = startFuture .thenApplyAsync(filter::startFilterLookup) .thenApplyAsync(postFilterTask::whenDone); return future; }</code><technical_language>do filters need access results of previous filters? Is skip call screening if else blocks call</technical_language>

Target:
private CompletableFuture<CallFilteringResult> scheduleFilter(CallFilter filter, BlockingQueue<CallFilter> filtersQueue) { CallFilteringResult result = new CallFilteringResult.Builder() .setShouldAllowCall(true) .setShouldReject(false) .setShouldSilence(false) .setShouldAddToCallLog(true) .setShouldShowNotification(true) .setCall(mCall) .build(); for (CallFilter dependencyFilter : filter.getDependencies()) { result = result.combine(dependencyFilter.getResult()); } final CallFilteringResult input = result; CompletableFuture<CallFilteringResult> startFuture = CompletableFuture.supplyAsync(() -> input); PostFilterTask postFilterTask = new PostFilterTask(filter); return startFuture .thenApplyAsync(filter::startFilterLookup) .thenApplyAsync(postFilterTask::whenDone); }
Source:
<code>public void provisionSnapshotTrash(String[] argv) throws IOException { Path p = new Path(argv[1]); final HdfsAdmin admin = new HdfsAdmin(p.toUri(), getConf()); try { admin.provisionSnapshottableDirTrash(p); } catch (SnapshotException e) { throw new RemoteException(e.getClass().getName(), e.getMessage()); } <START> System.out.println("Provision of snapshot trash in " + argv[1] + <END> " succeeded"); }</code><technical_language>Print out trash path</technical_language>

Target:
public void provisionSnapshotTrash(String[] argv) throws IOException { Path p = new Path(argv[1]); final HdfsAdmin admin = new HdfsAdmin(p.toUri(), getConf()); Path trashRoot; try { trashRoot = admin.provisionSnapshotTrash(p); } catch (SnapshotException e) { throw new RemoteException(e.getClass().getName(), e.getMessage()); } System.out.println("Successfully provisioned snapshot trash at " + trashRoot); }
Source:
<code>public void run() { long current = new Date().getTime(); Date otherCutoff = new Date(current - MAIN_TABLES_AGE_LIMIT_SECONDS.getValue() * SECOND_MILLIS); cleanupLabelTables(otherCutoff); cleanupExternalHandlerExternalHandlerProcessMapTables(otherCutoff); cleanupTableByQuery(MOUNT_DELETE_QUERY, "mount", otherCutoff); cleanupTableByQuery(SECRET_CLEANUP_VSPM_QUERY, "volume_storage_pool_map", otherCutoff); <START> cleanupTableByQuery(SECRET_CLEAUP_VOLUME_QUERY, "volume", otherCutoff); <END> Date processInstanceCutoff = new Date(current - PROCESS_INSTANCE_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanup("process_instance", processInstanceTables, processInstanceCutoff); Date eventTableCutoff = new Date(current - EVENT_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanupServiceEventTable(eventTableCutoff); cleanup("event", eventTables, eventTableCutoff); Date auditLogCutoff = new Date(current - AUDIT_LOG_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanup("audit_log", auditLogTables, auditLogCutoff); Date serviceLogCutoff = new Date(current - SERVICE_LOG_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanup("service_log", serviceLogTables, serviceLogCutoff); cleanup("main", otherTables, otherCutoff); }</code><technical_language>Add new queries end of cleanup run</technical_language>

Target:
public void run() { long current = new Date().getTime(); Date otherCutoff = new Date(current - MAIN_TABLES_AGE_LIMIT_SECONDS.getValue() * SECOND_MILLIS); cleanupLabelTables(otherCutoff); cleanupExternalHandlerExternalHandlerProcessMapTables(otherCutoff); cleanupTableByQuery(MOUNT_DELETE_QUERY, "mount", otherCutoff); Date processInstanceCutoff = new Date(current - PROCESS_INSTANCE_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanup("process_instance", processInstanceTables, processInstanceCutoff); Date eventTableCutoff = new Date(current - EVENT_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanupServiceEventTable(eventTableCutoff); cleanup("event", eventTables, eventTableCutoff); Date auditLogCutoff = new Date(current - AUDIT_LOG_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanup("audit_log", auditLogTables, auditLogCutoff); Date serviceLogCutoff = new Date(current - SERVICE_LOG_AGE_LIMIT_SECONDS.get() * SECOND_MILLIS); cleanup("service_log", serviceLogTables, serviceLogCutoff); cleanup("main", otherTables, otherCutoff); cleanupTableByQuery(SECRET_CLEANUP_VSPM_QUERY, "volume_storage_pool_map", otherCutoff); cleanupTableByQuery(SECRET_CLEAUP_VOLUME_QUERY, "volume", otherCutoff); }
Source:
<code>public void executeATakesAsAServlet() throws Exception { final String name = "webapp"; final HttpServer server = HttpServer.createSimpleServer("./", 18080); final WebappContext context = new WebappContext(name); final ServletRegistration servlet = context.addServlet( "takes", SrvTake.class ); servlet.setInitParameter("take", TkServletApp.class.getName()); servlet.addMapping("/test"); context.deploy(server); server.start(); new JdkRequest("http://localhost:18080/test") .fetch() .as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) .assertBody( <START> new StringContains( <END> new FormattedText( "Hello servlet! Using [%s] ServletContext.", name ).asString() ) ); server.shutdownNow(); }</code><technical_language>@fabriciofx Text matchers cactoos-macthers assert Text implementations</technical_language>

Target:
public void executeATakesAsAServlet() throws Exception { final String name = "webapp"; final HttpServer server = HttpServer.createSimpleServer("./", 18080); final WebappContext context = new WebappContext(name); final ServletRegistration servlet = context.addServlet( "takes", SrvTake.class ); servlet.setInitParameter("take", TkApp.class.getName()); servlet.addMapping("/test"); context.deploy(server); server.start(); new JdkRequest("http://localhost:18080/test") .fetch() .as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) .assertBody( new StringContains( new FormattedText( SrvTakeTest.MSG, name ).asString() ) ); server.shutdownNow(); }
Source:
<code>public static Object createProxy(final Class<?> type, final IProxyTargetLocator locator) { if (PRIMITIVES.contains(type) || Enum.class.isAssignableFrom(type)) { return locator.locateProxyTarget(); } else if (type.isInterface()) { JdkHandler handler = new JdkHandler(type, locator); try { return Proxy.newProxyInstance(resolveClassLoader(), new Class[] { type, Serializable.class, ILazyInitProxy.class, IWriteReplace.class }, handler); } catch (IllegalArgumentException e) { return Proxy.newProxyInstance(LazyInitProxyFactory.class.getClassLoader(), new Class[] { type, Serializable.class, ILazyInitProxy.class, IWriteReplace.class }, handler); } } else { CGLibInterceptor handler = new CGLibInterceptor(type, locator) { @Override public Object intercept(Object object, Method method, Object[] args, MethodProxy proxy) throws Throwable { <START> return super.intercept(object, method, args, proxy); <END> } }; Callback[] callbacks = new Callback[2]; callbacks[CGLIB_CALLBACK_NO_OVERRIDE] = new SerializableNoOpCallback(); callbacks[CGLIB_CALLBACK_HANDLER] = handler; Enhancer e = new Enhancer(); e.setClassLoader(resolveClassLoader()); e.setInterfaces(new Class[] { Serializable.class, ILazyInitProxy.class, IWriteReplace.class }); e.setSuperclass(type); e.setCallbackFilter(new CGLibCallbackFilter()); e.setCallbacks(callbacks); e.setNamingPolicy(WicketNamingPolicy.INSTANCE); return e.create(); } }</code><technical_language>is purpose of this override? call super</technical_language>

Target:
public static Object createProxy(final Class<?> type, final IProxyTargetLocator locator) { if (PRIMITIVES.contains(type) || Enum.class.isAssignableFrom(type)) { return locator.locateProxyTarget(); } else if (type.isInterface()) { JdkHandler handler = new JdkHandler(type, locator); try { return Proxy.newProxyInstance(resolveClassLoader(), new Class[] { type, Serializable.class, ILazyInitProxy.class, IWriteReplace.class }, handler); } catch (IllegalArgumentException e) { return Proxy.newProxyInstance(LazyInitProxyFactory.class.getClassLoader(), new Class[] { type, Serializable.class, ILazyInitProxy.class, IWriteReplace.class }, handler); } } else { CGLibInterceptor handler = new CGLibInterceptor(type, locator); Callback[] callbacks = new Callback[2]; callbacks[CGLIB_CALLBACK_NO_OVERRIDE] = new SerializableNoOpCallback(); callbacks[CGLIB_CALLBACK_HANDLER] = handler; Enhancer e = new Enhancer(); e.setClassLoader(resolveClassLoader()); e.setInterfaces(new Class[] { Serializable.class, ILazyInitProxy.class, IWriteReplace.class }); e.setSuperclass(type); e.setCallbackFilter(new NoOpForProtectedMethodsCGLibCallbackFilter()); e.setCallbacks(callbacks); e.setNamingPolicy(WicketNamingPolicy.INSTANCE); return e.create(); } }
Source:
<code><START> public void clearSwapDir() throws IOException { <END> if (! m_blockPathMap.isEmpty()) { throw new IllegalStateException("Attempt to clear swap directory when " + "there are still managed blocks; use releaseAllBlocks() instead"); } try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(m_largeQuerySwapPath)) { Iterator<Path> it = dirStream.iterator(); while (it.hasNext()) { Path path = it.next(); VoltFile.recursivelyDelete(path.toFile()); } } }</code><technical_language>If needed cleared in init --force please do cleanup too</technical_language>

Target:
private void clearSwapDir() throws IOException { if (! m_blockPathMap.isEmpty()) { throw new IllegalStateException("Attempt to clear swap directory when " + "there are still managed blocks; use releaseAllBlocks() instead"); } try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(m_largeQuerySwapPath)) { Iterator<Path> it = dirStream.iterator(); while (it.hasNext()) { Path path = it.next(); VoltFile.recursivelyDelete(path.toFile()); } } }
Source:
<code>protected ToStringHelper string() { ToStringHelper toString = Objects.toStringHelper("").omitNullValues(); toString.add("keyName", keyName); if (securityGroupNames.size() > 0) toString.add("securityGroupNames", securityGroupNames); if (metadata.size() > 0) toString.add("metadata", metadata); if (personality.size() > 0) toString.add("personality", personality); if (adminPass != null) toString.add("adminPassPresent", true); if (diskConfig != null) toString.add("diskConfig", diskConfig); toString.add("userData", userData == null ? null : new String(userData)); if (!networks.isEmpty()) toString.add("networks", networks); toString.add("availability_zone", availabilityZone == null ? null : availabilityZone); toString.add("configDrive", configDrive); <START> if (!blockDeviceMapping.isEmpty()) <END> toString.add("blockDeviceMapping", blockDeviceMapping); return toString; }</code><technical_language>I prefer !isEmpty size() > 0, is else in this method, switch that</technical_language>

Target:
protected ToStringHelper string() { ToStringHelper toString = MoreObjects.toStringHelper("").omitNullValues(); toString.add("keyName", keyName); if (!securityGroupNames.isEmpty()) toString.add("securityGroupNames", securityGroupNames); if (!metadata.isEmpty()) toString.add("metadata", metadata); if (!personality.isEmpty()) toString.add("personality", personality); if (adminPass != null) toString.add("adminPassPresent", true); if (diskConfig != null) toString.add("diskConfig", diskConfig); toString.add("userData", userData == null ? null : new String(userData)); if (!networks.isEmpty()) toString.add("networks", networks); toString.add("availability_zone", availabilityZone == null ? null : availabilityZone); toString.add("configDrive", configDrive); if (!blockDeviceMapping.isEmpty()) toString.add("blockDeviceMapping", blockDeviceMapping); return toString; }
Source:
<code>public static Slice stInteriorRingN(@SqlType(GEOMETRY_TYPE_NAME) Slice input, @SqlType(INTEGER) long index) { OGCGeometry geometry = deserialize(input); validateType("ST_InteriorRingN", geometry, EnumSet.of(POLYGON)); if (geometry.isEmpty()) { return null; } OGCPolygon polygon = (OGCPolygon) geometry; if (index < 1 || index > polygon.numInteriorRing()) { return null; } <START> OGCGeometry interiorRing = polygon.interiorRingN((int) index - 1); <END> return serialize(interiorRing); }</code><technical_language>Math.toIntExact(index) instead of a cast (int) index</technical_language>

Target:
public static Slice stInteriorRingN(@SqlType(GEOMETRY_TYPE_NAME) Slice input, @SqlType(INTEGER) long index) { OGCGeometry geometry = deserialize(input); validateType("ST_InteriorRingN", geometry, EnumSet.of(POLYGON)); OGCPolygon polygon = (OGCPolygon) geometry; if (index < 1 || index > polygon.numInteriorRing()) { return null; } OGCGeometry interiorRing = polygon.interiorRingN(toIntExact(index) - 1); return serialize(interiorRing); }
Source:
<code>protected void processAffinityGroup(AffinityGroupVMMapVO vmGroupMapping, DeploymentPlan plan, VirtualMachine vm) { <START> if (vmGroupMapping != null) { <END> AffinityGroupVO group = _affinityGroupDao.findById(vmGroupMapping.getAffinityGroupId()); s_logger.debug("Processing affinity group " + group.getName() + " for VM Id: " + vm.getId()); List<Long> groupVMIds = _affinityGroupVMMapDao.listVmIdsByAffinityGroup(group.getId()); groupVMIds.remove(vm.getId()); List<Long> preferredHosts = getPreferredHostsFromGroupVMIds(groupVMIds); plan.setPreferredHosts(preferredHosts); } }</code><technical_language>Is for this vmGroupMapping null? code this impossible case</technical_language>

Target:
protected void processAffinityGroup(AffinityGroupVMMapVO vmGroupMapping, DeploymentPlan plan, VirtualMachine vm) { AffinityGroupVO group = _affinityGroupDao.findById(vmGroupMapping.getAffinityGroupId()); s_logger.debug("Processing affinity group " + group.getName() + " for VM Id: " + vm.getId()); List<Long> groupVMIds = _affinityGroupVMMapDao.listVmIdsByAffinityGroup(group.getId()); groupVMIds.remove(vm.getId()); List<Long> preferredHosts = getPreferredHostsFromGroupVMIds(groupVMIds); plan.setPreferredHosts(preferredHosts); }
Source:
<code>public ByteBufferReadableStreamChannel(List<ByteBuffer> bufferList) { <START> if (bufferList != null) { <END> buffers = bufferList; } else { buffers = new ArrayList<>(); } buffers.add(null); size = computeSize(bufferList); }</code><technical_language>bufferList null - throw a IllegalArgumentException</technical_language>

Target:
public ByteBufferReadableStreamChannel(List<ByteBuffer> bufferList) { if (bufferList == null || bufferList.isEmpty()) { throw new IllegalArgumentException( "Input List of ByteBuffer cannot be null/empty for ByteBufferReadableStreamChannel"); } buffers = bufferList; size = computeSize(bufferList); }
Source:
<code>public static <START> @NonNull JsReplyProxyImpl <END> forInvocationHandler( @NonNull InvocationHandler invocationHandler) { final JsReplyProxyBoundaryInterface boundaryInterface = BoundaryInterfaceReflectionUtil.castToSuppLibClass( JsReplyProxyBoundaryInterface.class, invocationHandler); return (JsReplyProxyImpl) boundaryInterface.getOrCreatePeer( () -> new JsReplyProxyImpl(boundaryInterface)); }</code><technical_language>nit: annotations line above, @Override</technical_language>

Target:
public static JsReplyProxyImpl forInvocationHandler( @NonNull InvocationHandler invocationHandler) { final JsReplyProxyBoundaryInterface boundaryInterface = BoundaryInterfaceReflectionUtil.castToSuppLibClass( JsReplyProxyBoundaryInterface.class, invocationHandler); return (JsReplyProxyImpl) boundaryInterface.getOrCreatePeer( () -> new JsReplyProxyImpl(boundaryInterface)); }
Source:
<code>public void all_validUsers() { UserStore userStore = new SharedPrefsUserStore(InstrumentationRegistry.getContext()); SyncManager.setUserStore(userStore); userStore.put(UserStore.CURRENT_USER_KEY, SyncTestUtils.createTestUser(Long.MIN_VALUE)); userStore.put(UserStore.CURRENT_USER_KEY, SyncTestUtils.createTestUser(Long.MAX_VALUE)); Collection<User> users = User.all(); assertEquals(1, users.size()); <START> <END> }</code><technical_language>Remove empty line</technical_language>

Target:
public void all_validUsers() { UserStore userStore = new SharedPrefsUserStore(InstrumentationRegistry.getContext()); SyncManager.setUserStore(userStore); userStore.put(UserStore.CURRENT_USER_KEY, SyncTestUtils.createTestUser(Long.MIN_VALUE)); userStore.put(UserStore.CURRENT_USER_KEY, SyncTestUtils.createTestUser(Long.MAX_VALUE)); Collection<User> users = User.all(); assertEquals(1, users.size()); assertTrue(users.iterator().next().isValid()); }
Source:
<code>ResponseEntity<Object> ImportThumbnail(@PathVariable("pid") String pid, @RequestParam("file") MultipartFile thumbnailFile) throws Exception { AgentPrincipals agent = AgentPrincipals.createFromThread(); String mimeType = thumbnailFile.getContentType(); Map<String, Object> result = new HashMap<>(); result.put("action", "editThumbnail"); result.put("username", agent.getUsername()); try (InputStream importStream = thumbnailFile.getInputStream()) { service.run(importStream, agent, pid, mimeType); } catch (IOException e) { log.error("Failed to get submitted file", e); result.put("error", e.getMessage()); return new ResponseEntity<>(result, HttpStatus.INTERNAL_SERVER_ERROR); } catch (IllegalArgumentException e) { log.error("Error queueing the job", e); result.put("error", e.getMessage()); <START> return new ResponseEntity<>(result, HttpStatus.INTERNAL_SERVER_ERROR); <END> } result.put("destination", pid); return new ResponseEntity<>(result, HttpStatus.OK); }</code><technical_language>kind of operation throw IllegalArgumentException? expect a 4xx for bad input</technical_language>

Target:
ResponseEntity<Object> ImportThumbnail(@PathVariable("pid") String pid, @RequestParam("file") MultipartFile thumbnailFile) throws Exception { AgentPrincipals agent = AgentPrincipals.createFromThread(); String mimeType = thumbnailFile.getContentType(); Map<String, Object> result = new HashMap<>(); result.put("action", "editThumbnail"); result.put("username", agent.getUsername()); try (InputStream importStream = thumbnailFile.getInputStream()) { service.run(importStream, agent, pid, mimeType); } catch (IOException e) { log.error("Failed to get submitted file", e); result.put("error", e.getMessage()); return new ResponseEntity<>(result, HttpStatus.INTERNAL_SERVER_ERROR); } catch (IllegalArgumentException e) { log.error("Error queueing the job", e); result.put("error", e.getMessage()); return new ResponseEntity<>(result, HttpStatus.UNSUPPORTED_MEDIA_TYPE); } result.put("destination", pid); return new ResponseEntity<>(result, HttpStatus.OK); }
Source:
<code>public DLNAThumbnailInputStream getThumbnailInputStream() throws IOException { if (thumbURL != null) { return DLNAThumbnailInputStream.toThumbnailInputStream( FileUtil.isUrl(thumbURL) ? downloadAndSend(thumbURL, true) : new FileInputStream(thumbURL) ); } else { try (DLNAThumbnailInputStream dtis = super.getThumbnailInputStream()) { <START> return dtis; <END> } } }</code><technical_language>I unsure this one. this, returning a live stream, this returning a closed stream</technical_language>

Target:
public DLNAThumbnailInputStream getThumbnailInputStream() throws IOException { if (thumbURL != null) { return DLNAThumbnailInputStream.toThumbnailInputStream( FileUtil.isUrl(thumbURL) ? downloadAndSend(thumbURL, true) : new FileInputStream(thumbURL) ); } else { DLNAThumbnailInputStream dtis = super.getThumbnailInputStream(); return dtis; } }
Source:
<code>private static Map<RuleKey, RuleDefinitionDto> buildDbRulesByDbDeprecatedKey(Set<SingleDeprecatedRuleKey> dbDeprecatedKeys, Map<RuleKey, RuleDefinitionDto> dbRules) { <START> Map<Integer, Set<SingleDeprecatedRuleKey>> dbDeprecatedKeysById = dbDeprecatedKeys.stream() <END> .collect(Collectors.groupingBy(SingleDeprecatedRuleKey::getRuleId, Collectors.toSet())); Map<Integer, RuleDefinitionDto> dbRulesByRuleId = dbRules.values().stream() .collect(uniqueIndex(RuleDefinitionDto::getId)); ImmutableMap.Builder<RuleKey, RuleDefinitionDto> builder = ImmutableMap.builder(); for (Map.Entry<Integer, Set<SingleDeprecatedRuleKey>> entry : dbDeprecatedKeysById.entrySet()) { Integer ruleId = entry.getKey(); RuleDefinitionDto rule = dbRulesByRuleId.get(ruleId); if (rule == null) { LOG.warn("Could not retrieve rule with id %s referenced by a deprecated rule key. " + "The following deprecated rule keys seem to be referencing a non-existing rule", ruleId, entry.getValue()); } else { entry.getValue().forEach(d -> builder.put(d.getOldRuleKeyAsRuleKey(), rule)); } } return builder.build(); }</code><technical_language>this map is required build rulesByDbDeprecatedKey. Loop line 220 easily changed work Set<SingleDeprecatedRuleKey></technical_language>

Target:
private static Map<RuleKey, RuleDefinitionDto> buildDbRulesByDbDeprecatedKey(Set<SingleDeprecatedRuleKey> dbDeprecatedKeys, Map<RuleKey, RuleDefinitionDto> dbRules) { Map<Integer, RuleDefinitionDto> dbRulesByRuleId = dbRules.values().stream() .collect(uniqueIndex(RuleDefinitionDto::getId)); ImmutableMap.Builder<RuleKey, RuleDefinitionDto> builder = ImmutableMap.builder(); for (SingleDeprecatedRuleKey entry : dbDeprecatedKeys) { Integer ruleId = entry.getRuleId(); RuleDefinitionDto rule = dbRulesByRuleId.get(ruleId); if (rule == null) { LOG.warn("Could not retrieve rule with id %s referenced by a deprecated rule key. " + "The following deprecated rule keys seem to be referencing a non-existing rule", ruleId, entry); } else { builder.put(entry.getOldRuleKeyAsRuleKey(), rule); } } return builder.build(); }
Source:
<code>public void addPartition(String partitionName) { ReplicaId localReplica = storeManager.getReplica(partitionName); List<? extends ReplicaId> leaderReplicas = localReplica.getPartitionId().getReplicaIdsByState(ReplicaState.LEADER, null); List<ReplicaId> peerLeaderReplicas = new ArrayList<>(); for (ReplicaId leaderReplica : leaderReplicas) { if (leaderReplica.getDataNodeId() != localReplica.getDataNodeId()) { peerLeaderReplicas.add(leaderReplica); logger.info("Partition on node instance is leader in remote dc {}", partitionName, getInstanceName(leaderReplica.getDataNodeId().getHostname(), leaderReplica.getDataNodeId().getPort()), leaderReplica.getDataNodeId().getDatacenterName()); } } <START> rwLock.writeLock().lock(); <END> try { peerLeaderReplicasByPartition.put(partitionName, new HashSet<>(peerLeaderReplicas)); } finally { rwLock.writeLock().unlock(); } }</code><technical_language>write lock locked of line 67 (before getReplicaIdsByState() is called). is a race condition miss remote leadership change</technical_language>

Target:
public void addPartition(String partitionName) { ReplicaId localReplica = storeManager.getReplica(partitionName); rwLock.writeLock().lock(); try { List<? extends ReplicaId> leaderReplicas = localReplica.getPartitionId().getReplicaIdsByState(ReplicaState.LEADER, null); Set<ReplicaId> peerLeaderReplicas = new HashSet<>(); for (ReplicaId leaderReplica : leaderReplicas) { if (leaderReplica.getDataNodeId() != localReplica.getDataNodeId()) { peerLeaderReplicas.add(leaderReplica); logger.info("Partition on node instance is leader in remote dc {}", partitionName, getInstanceName(leaderReplica.getDataNodeId().getHostname(), leaderReplica.getDataNodeId().getPort()), leaderReplica.getDataNodeId().getDatacenterName()); } } peerLeaderReplicasByPartition.put(partitionName, peerLeaderReplicas); } finally { rwLock.writeLock().unlock(); } }
Source:
<code>public void write(NutchDocument doc) throws IOException { String id = (String) doc.getFieldValue("id"); String type = doc.getDocumentMeta().get("type"); if (type == null) type = "doc"; IndexRequestBuilder request = client.prepareIndex(defaultIndex, type, id); Map<String, Object> source = new HashMap<String, Object>(); for (String fieldName : doc.getFieldNames()) { if (doc.getFieldValues(fieldName).size() > 1) { source.put(fieldName, doc.getFieldValue(fieldName)); for (Object value : doc.getFieldValues(fieldName)) { bulkLength += value.toString().length(); } } else { source.put(fieldName, doc.getFieldValue(fieldName)); bulkLength += doc.getFieldValue(fieldName).toString().length(); } } request.setSource(source); bulk.add(request); indexedDocs++; bulkDocs++; if (bulkDocs >= maxBulkDocs || bulkLength >= maxBulkLength) { <START> LOG.info("Processing bulk request [docs = " + bulkDocs + ", length = " <END> + bulkLength + ", total docs = " + indexedDocs + ", last doc in bulk = '" + id + "']"); createNewBulk = true; commit(); } }</code><technical_language>Logging improved parameterized messages <LINK_0></technical_language>

Target:
public void write(NutchDocument doc) throws IOException { String id = (String) doc.getFieldValue("id"); String type = doc.getDocumentMeta().get("type"); if (type == null) type = "doc"; IndexRequestBuilder request = client.prepareIndex(defaultIndex, type, id); Map<String, Object> source = new HashMap<String, Object>(); for (String fieldName : doc.getFieldNames()) { if (doc.getFieldValues(fieldName).size() > 1) { source.put(fieldName, doc.getFieldValue(fieldName)); for (Object value : doc.getFieldValues(fieldName)) { bulkLength += value.toString().length(); } } else { source.put(fieldName, doc.getFieldValue(fieldName)); bulkLength += doc.getFieldValue(fieldName).toString().length(); } } request.setSource(source); bulk.add(request); indexedDocs++; bulkDocs++; if (bulkDocs >= maxBulkDocs || bulkLength >= maxBulkLength) { LOG.info("Processing bulk request [docs = {}, length = {}, total docs = {}" + ", last doc in bulk = '{}']", bulkDocs, bulkLength, indexedDocs, id ); createNewBulk = true; commit(); } }
Source:
<code>public void run() throws Exception { HadoopConfigurationInjector.prepareResourcesToInject(getJobProps(), getWorkingDirectory()); if (shouldProxy && obtainTokens) { userToProxy = getJobProps().getString("user.to.proxy"); getLog().info("Need to proxy. Getting tokens."); Props props = new Props(); props.putAll(getJobProps()); props.putAll(getSysProps()); <START> String additionalNamenodes = <END> (new Configuration()).get(HadoopJobUtils.MAPREDUCE_JOB_OTHER_NAMENODES); if (additionalNamenodes != null && additionalNamenodes.length() > 0) { HadoopJobUtils.addAdditionalNamenodesToProps(props, additionalNamenodes); } tokenFile = HadoopJobUtils .getHadoopTokens(hadoopSecurityManager, props, getLog()); getJobProps().put("env." + HADOOP_TOKEN_FILE_LOCATION, tokenFile.getAbsolutePath()); } try { super.run(); } catch (Throwable t) { t.printStackTrace(); getLog().error("caught error running the job", t); throw new Exception(t); } finally { if (tokenFile != null) { HadoopJobUtils.cancelHadoopTokens(hadoopSecurityManager, userToProxy, tokenFile, getLog()); if (tokenFile.exists()) { tokenFile.delete(); } } } }</code><technical_language>This code is in multiple classes. great reduce code duplication</technical_language>

Target:
public void run() throws Exception { HadoopConfigurationInjector.prepareResourcesToInject(getJobProps(), getWorkingDirectory()); if (shouldProxy && obtainTokens) { userToProxy = getJobProps().getString("user.to.proxy"); getLog().info("Need to proxy. Getting tokens."); Props props = new Props(); props.putAll(getJobProps()); props.putAll(getSysProps()); HadoopJobUtils.addAdditionalNamenodesToPropsFromMRJob(props, getLog()); tokenFile = HadoopJobUtils .getHadoopTokens(hadoopSecurityManager, props, getLog()); getJobProps().put("env." + HADOOP_TOKEN_FILE_LOCATION, tokenFile.getAbsolutePath()); } try { super.run(); } catch (Throwable t) { t.printStackTrace(); getLog().error("caught error running the job", t); throw new Exception(t); } finally { if (tokenFile != null) { HadoopJobUtils.cancelHadoopTokens(hadoopSecurityManager, userToProxy, tokenFile, getLog()); if (tokenFile.exists()) { tokenFile.delete(); } } } }
Source:
<code>private String prefixedTimestampTableName() { <START> return AtlasDbConstants.TIMELOCK_TIMESTAMP_TABLE.getQualifiedName(); <END> }</code><technical_language>ideal this hardcoded, do for Cassandra</technical_language>

Target:
private String prefixedTimestampTableName() { return tablePrefix + timestampTable.getQualifiedName(); }
Source:
<code>public void open(Map conf, final TopologyContext context, SpoutOutputCollector collector) { <START> if(Monitor.connection.client == null || !Monitor.connection.client.isConnected()) <END> Monitor.connection.connect(); delegate.open(conf, context, new SpoutOutputCollector(collector) { @Override public List<Integer> emit(String streamId, List<Object> tuple, Object messageId) { Monitor.startLatency(messageId); return super.emit(streamId, tuple, new MonitoringMessage(messageId, context.getThisComponentId())); } @Override public void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId) { Monitor.startLatency(messageId); super.emitDirect(taskId, streamId, tuple, new MonitoringMessage(messageId, context.getThisComponentId())); } }); }</code><technical_language>remove</technical_language>

Target:
public void open(Map conf, final TopologyContext context, SpoutOutputCollector collector) { spoutService = context.getThisComponentId(); delegate.open(conf, context, new SpoutOutputCollector(collector) { @Override public List<Integer> emit(String streamId, List<Object> tuple, Object messageId) { List<Integer> emitResult = super.emit(streamId, tuple, messageId); Monitor.getMonitor().startLatency(messageId); return emitResult; } @Override public void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId) { super.emitDirect(taskId, streamId, tuple, messageId); Monitor.getMonitor().startLatency(messageId); } }); }
Source:
<code>public static void createOrUpdateDevice(UserSessionModel userSession, KeycloakSession session) { if (!Profile.isFeatureEnabled(Profile.Feature.DEVICE_ACTIVITY)) { return; } <START> UserDeviceStore deviceProvider = getDeviceProvider(session); <END> if (deviceProvider == null) { return; } UserModel user = userSession.getUser(); if (user == null) { return; } if (session.getAttribute(DEVICE_UPDATED_FLAG) == null) { DeviceModel current = getCurrentDevice(session); if (current != null) { DeviceModel device = getUserDevice(userSession, current, deviceProvider); if (device == null) { registerDevice(userSession, current, deviceProvider); } else { updateDevice(userSession, current, device, deviceProvider); } session.setAttribute(DEVICE_UPDATED_FLAG, true); } } }</code><technical_language>This happen. some log.warning done</technical_language>

Target:
public static void createOrUpdateDevice(UserSessionModel userSession, KeycloakSession session) { if (!Profile.isFeatureEnabled(Profile.Feature.DEVICE_ACTIVITY)) { return; } if (session.getAttributeOrDefault(DEVICE_UPDATED_FLAG, true)) { UserDeviceStore deviceProvider = (UserDeviceStore) session.users(); for (DeviceFingerPrintProvider provider : session.getAllProviders(DeviceFingerPrintProvider.class)) { DeviceModel current = provider.getCurrentDevice(userSession, deviceProvider); if (current != null) { DeviceModel device = getUserDevice(userSession, current, deviceProvider, provider); if (device == null) { registerDevice(userSession, current, deviceProvider, session); } else { updateDevice(userSession, device, session); } session.setAttribute(DEVICE_UPDATED_FLAG, false); return; } } } }
Source:
<code>public Future<Boolean> triggerCheckpointAsync( CheckpointMetaData metadata, CheckpointOptions options, boolean advanceToEndOfEventTime) { CompletableFuture<Boolean> resultFuture = new CompletableFuture<>(); mainMailboxExecutor.execute( () -> { try { pendingCheckpointCompletedFutures.put(metadata.getCheckpointId(), resultFuture); <START> triggerSourcesCheckpoint(new CheckpointBarrier(metadata.getCheckpointId(), metadata.getTimestamp(), options)); <END> } catch (Exception ex) { pendingCheckpointCompletedFutures.remove(metadata.getCheckpointId()); resultFuture.completeExceptionally(ex); throw ex; } }, "checkpoint %s with %s", metadata, options); return resultFuture; }</code><technical_language>update super.latestAsyncCheckpointStartDelayNanos</technical_language>

Target:
public Future<Boolean> triggerCheckpointAsync( CheckpointMetaData metadata, CheckpointOptions options, boolean advanceToEndOfEventTime) { CompletableFuture<Boolean> resultFuture = new CompletableFuture<>(); mainMailboxExecutor.execute( () -> { try { pendingCheckpointCompletedFutures.put(metadata.getCheckpointId(), resultFuture); checkPendingCheckpointCompletedFuturesSize(); triggerSourcesCheckpoint(new CheckpointBarrier(metadata.getCheckpointId(), metadata.getTimestamp(), options)); } catch (Exception ex) { pendingCheckpointCompletedFutures.remove(metadata.getCheckpointId()); resultFuture.completeExceptionally(ex); throw ex; } }, "checkpoint %s with %s", metadata, options); return resultFuture; }
Source:
<code>public Boolean autoGenerateIdentificationBarcodes() { <START> MisoPropertyExporter exporter = (MisoPropertyExporter)applicationContextProvider.getApplicationContext().getBean("propertyConfigurer"); <END> Map<String, String> misoProperties = exporter.getResolvedProperties(); return misoProperties.containsKey("miso.autoGenerateIdentificationBarcodes") && Boolean.parseBoolean(misoProperties.get("miso.autoGenerateIdentificationBarcodes")); }</code><technical_language>This a compiler warning ApplicationContextProvider.getApplicationContext() is a static method. static - I run application this a static call work fine</technical_language>

Target:
public Boolean autoGenerateIdentificationBarcodes() { MisoPropertyExporter exporter = (MisoPropertyExporter)ApplicationContextProvider.getApplicationContext().getBean("propertyConfigurer"); Map<String, String> misoProperties = exporter.getResolvedProperties(); return misoProperties.containsKey("miso.autoGenerateIdentificationBarcodes") && Boolean.parseBoolean(misoProperties.get("miso.autoGenerateIdentificationBarcodes")); }
Source:
<code>private boolean validateDB(Uri inputUri) throws IOException { boolean ok = false; try (InputStream inputStream = getContentResolver().openInputStream(inputUri)) { byte[] magicBuf = new byte[16]; if (inputStream.read(magicBuf) == magicBuf.length) { ok = Arrays.equals(SQLITE3_MAGIC, magicBuf); } } if (!ok) { Log.i(TAG, "Not a SQLite3 file: " + inputUri.toString()); <START> Snackbar.make(findViewById(R.id.import_export_layout), R.string.import_bad_file, Snackbar.LENGTH_SHORT).show(); <END> } return false; }</code><technical_language>prefer alert instead of a toast. easily missed. Great job</technical_language>

Target:
private boolean validateDB(Uri inputUri) throws IOException { try (InputStream inputStream = getContentResolver().openInputStream(inputUri)) { byte[] magicBuf = new byte[SQLITE3_MAGIC.length]; if (inputStream.read(magicBuf) == magicBuf.length) { return Arrays.equals(SQLITE3_MAGIC, magicBuf); } } return false; }
Source:
<code>public String expandVariableSubstitutes(String expression) { assertStarted(); <START> HiveConf hiveConfLocal = getHiveConf(); <END> Preconditions.checkNotNull(hiveConfLocal); return hiveServerContainer.getVariableSubstitution().substitute(hiveConfLocal, expression); }</code><technical_language>rule speaks code readability. I readability of methods a problem. a bigger problem call "local" is local. in local remote</technical_language>

Target:
public String expandVariableSubstitutes(String expression) { assertStarted(); HiveConf hiveConf = getHiveConf(); Preconditions.checkNotNull(hiveConf); return hiveServerContainer.getVariableSubstitution().substitute(hiveConf, expression); }
Source:
<code>public void draw(GuiContainer guiContainer, boolean isSelectedtab, int guiLeft, int guiTop, int xSize, int ySize, RenderItem itemRender, FontRenderer fontRendererObj) { boolean isFirstRow = isTopRow(); int column = getColumn(); int texX = column * 28; int texY = 0; int x = guiLeft + 28 * column; int y = guiTop; if (isSelectedtab) texY += 32; if (column == 5) x = guiLeft + xSize - 28; else if (column > 0) x += column; if (isFirstRow) y = y - 28; else { texY += 64; y = y + (ySize - 4); } RenderHelper.enableGUIStandardItemLighting(); GlStateManager.disableLighting(); GlStateManager.color(1F, 1F, 1F); GlStateManager.enableBlend(); guiContainer.drawTexturedModalRect(x, y, texX, texY, 28, 32); x = x + 6; y = y + 8 + (isFirstRow ? 1 : -1); GlStateManager.enableLighting(); <START> if (getIconStack() != null) <END> { ItemStack itemstack = getIconStack(); itemRender.renderItemAndEffectIntoGUI(itemstack, x, y); itemRender.renderItemOverlays(fontRendererObj, itemstack, x, y); } else if (getIconResLoc() != null) { Minecraft.getMinecraft().getTextureManager().bindTexture(getIconResLoc()); Gui.drawModalRectWithCustomSizedTexture(x, y, 0f, 0f, 16, 16, 16f, 16f); } GlStateManager.disableLighting(); }</code><technical_language>!isEmpty() check</technical_language>

Target:
public void draw(GuiContainer guiContainer, boolean isSelectedtab, int guiLeft, int guiTop, int xSize, int ySize, RenderItem itemRender, FontRenderer fontRendererObj) { boolean isFirstRow = isTopRow(); int column = getColumn(); int texX = column * 28; int texY = 0; int x = guiLeft + 28 * column; int y = guiTop; if (isSelectedtab) texY += 32; else if (column > 0) x += column; if (isFirstRow) y = y - 28; else { texY += 64; y = y + (ySize - 4); } RenderHelper.enableGUIStandardItemLighting(); GlStateManager.disableLighting(); GlStateManager.color(1F, 1F, 1F); GlStateManager.enableBlend(); guiContainer.drawTexturedModalRect(x, y, texX, texY, 28, 32); x = x + 6; y = y + 8 + (isFirstRow ? 1 : -1); GlStateManager.enableLighting(); if (!getIconStack().isEmpty()) { ItemStack itemstack = getIconStack(); itemRender.renderItemAndEffectIntoGUI(itemstack, x, y); itemRender.renderItemOverlays(fontRendererObj, itemstack, x, y); } else if (getIconResLoc() != null) { Minecraft.getMinecraft().getTextureManager().bindTexture(getIconResLoc()); Gui.drawModalRectWithCustomSizedTexture(x, y, 0f, 0f, 16, 16, 16f, 16f); } GlStateManager.disableLighting(); }
Source:
<code><START> public void clear() { <END> this.domainsVisibility.clear(); }</code><technical_language>this synchronized</technical_language>

Target:
public synchronized void clear() { this.domainsVisibility.clear(); }