auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public <T> T transact( RetryLogic logic, AccessMode mode, Function<Transaction, T> work ) throws NotCommittedException, ServiceUnavailableException { int remaining = logic.attempts(); while ( remaining > 0 ) { try ( Session session = session( mode ) ) { boolean failed = false; Transaction tx = session.beginTransaction(); try { T result = work.apply( tx ); tx.success(); return result; } catch ( SessionExpiredException e ) { failed = true; tx.failure(); remaining -= 1; } finally { if ( failed ) { try { tx.close(); } catch ( Exception ex ) { } } <START> <END> else { tx.close(); } } } try { Thread.sleep( logic.pause() ); } catch ( InterruptedException e ) { throw new NotCommittedException( format( "Interrupted after %d attempts", logic.attempts() - remaining ) ); } } throw new NotCommittedException( format( "Unable to commit transaction after %d attempts", logic.attempts() ) ); }</code><technical_language>weird extra line</technical_language>

Target:
public <T> T transact( RetryLogic logic, AccessMode mode, Function<Transaction, T> work ) throws NotCommittedException, ServiceUnavailableException { int remaining = logic.attempts(); while ( remaining > 0 ) { try ( Session session = session( mode ) ) { boolean failed = false; Transaction tx = session.beginTransaction(); try { T result = work.apply( tx ); tx.success(); return result; } catch ( SessionExpiredException e ) { failed = true; tx.failure(); remaining -= 1; } finally { if ( failed ) { try { tx.close(); } catch ( Exception ex ) { } } else { tx.close(); } } } try { Thread.sleep( logic.pauseMillis() ); } catch ( InterruptedException e ) { throw new NotCommittedException( format( "Interrupted after %d attempts", logic.attempts() - remaining ) ); } } throw new NotCommittedException( format( "Unable to commit transaction after %d attempts", logic.attempts() ) ); }
Source:
<code>protected GithubUrl withBranch(String branch) { <START> if (!isNullOrEmpty(branch)) { <END> this.branch = branch; } return this; }</code><technical_language>sense check for null? starting null</technical_language>

Target:
protected GithubUrl withBranch(String branch) { if (!Strings.isNullOrEmpty(branch)) { this.branch = branch; } return this; }
Source:
<code>public void visitNode(Tree tree) { if (!hasSemantic()) { return; } ModifiersTree modifiers; Symbol symbol; if (tree.is(Tree.Kind.METHOD)) { MethodTree methodTree = (MethodTree) tree; symbol = methodTree.symbol(); modifiers = methodTree.modifiers(); } else { ClassTree classTree = (ClassTree) tree; symbol = classTree.symbol(); modifiers = classTree.modifiers(); } <START> if (symbol.metadata().isAnnotatedWith("org.junit.jupiter.api.Test") && !symbol.isPackageVisibility()) { <END> Tree questionableNode = modifiers.modifiers().parallelStream() .filter(keywordTree -> { Modifier modifier = keywordTree.modifier(); return modifier.equals(Modifier.PUBLIC) || modifier.equals(Modifier.PRIVATE) || modifier.equals(Modifier.PROTECTED); }) .map(modifierKeywordTree -> (Tree) modifierKeywordTree) .findFirst() .orElse(tree); reportIssue(questionableNode, "Remove this access modifier"); } }</code><technical_language>org.junit.jupiter.api.Test a JUnit 5 test method, UnitTestUtils.hasJUnit5TestAnnotation(...) I in JunitNestedAnnotationCheck: private static boolean hasJUnit5TestMethods(ClassTree classTree) { return classTree.members().stream() .filter(member -> member.is(Tree.Kind.METHOD)) .map(MethodTree.class::cast) .anyMatch(UnitTestUtils::hasJUnit5TestAnnotation); }</technical_language>

Target:
public void visitNode(Tree tree) { if (!hasSemantic()) { return; } ClassTree classTree = (ClassTree) tree; List<MethodTree> testMethods = classTree.members().stream() .filter(member -> member.is(Tree.Kind.METHOD)) .map(MethodTree.class::cast) .filter(UnitTestUtils::hasJUnit5TestAnnotation) .collect(Collectors.toList()); testMethods.stream().map(MethodTree::modifiers).forEach(this::raiseIssueOnPresentAccessModifiers); if (!testMethods.isEmpty()) { raiseIssueOnPresentAccessModifiers(classTree.modifiers()); } }
Source:
<code>private JsonValue getPositionalPlaceholderValues(ParameterAccessor accessor) { JsonArray posValues = JsonArray.create(); for (Parameter parameter : this.queryMethod.getParameters().getBindableParameters()) { Object value = couchbaseConverter.convertForWriteIfNeeded(accessor.getBindableValue(parameter.getIndex())); <START> try { <END> posValues.add(value); }catch(InvalidArgumentException iae){ Object o = accessor.getBindableValue(parameter.getIndex()); if(o instanceof Object[]) { Object[] array=(Object[])o; JsonArray ja=JsonValue.ja(); for(Object e:array) { ja.add(String.valueOf(couchbaseConverter.convertForWriteIfNeeded(e))); } posValues.add(ja); } else { throw iae; } } } return posValues; }</code><technical_language>This bit overly complex debug. Also, properly formatted</technical_language>

Target:
private JsonValue getPositionalPlaceholderValues(ParameterAccessor accessor) { JsonArray posValues = JsonArray.create(); for (Parameter parameter : this.queryMethod.getParameters().getBindableParameters()) { Object rawValue = accessor.getBindableValue(parameter.getIndex()); Object value = couchbaseConverter.convertForWriteIfNeeded(rawValue); putPositionalValue(accessor, parameter, posValues, value); } return posValues; }
Source:
<code>private void removeMachine(String workspaceId, String machineId) { try (StripedLocks.WriteLock lock = stripedLocks.acquireWriteLock(workspaceId)) { EnvironmentHolder environmentHolder = environments.get(workspaceId); if (environmentHolder != null) { <START> for (int i = 0; i < environmentHolder.machines.size(); i++) { <END> if (environmentHolder.machines.get(i).getId().equals(machineId)) { environmentHolder.machines.remove(i); return; } } } } }</code><technical_language>removeFirstMatching(environmentHolder.machines, m -> m.getId().equlas(machineId))</technical_language>

Target:
private void removeMachine(String workspaceId, String machineId) { try (StripedLocks.WriteLock lock = stripedLocks.acquireWriteLock(workspaceId)) { EnvironmentHolder environmentHolder = environments.get(workspaceId); if (environmentHolder != null) { removeFirstMatching(environmentHolder.machines, m -> m.getId().equals(machineId)); } } }
Source:
<code>public ImageContent(Bitmap img, String caption) throws ContentException { Objects.requireNonNull(img); mImage = Bitmap.createBitmap(img); <START> mCaption = caption; <END> }</code><technical_language>mCaption = Objects.requireNonNull(caption);</technical_language>

Target:
public ImageContent(Bitmap img, String caption) throws ContentException { Objects.requireNonNull(img); mImage = Bitmap.createBitmap(img); mCaption = Objects.requireNonNull(caption); }
Source:
<code>public Map<UUID, StreamAddressSpace> getStreamsAddressSpace(List<StreamAddressRange> streamsAddressesRange) { <START> StreamsAddressResponse streamsAddressResponse = layoutHelper(e -> CFUtils.getUninterruptibly(e.getPrimarySequencerClient() .getStreamsAddressSpace(streamsAddressesRange))); return streamsAddressResponse.getAddressMap(); <END> }</code><technical_language>This is a stream range query (scans bitsets sequencer), re-add metric. Actually, a bug right related bitset queries #2747</technical_language>

Target:
public Map<UUID, StreamAddressSpace> getStreamsAddressSpace(List<StreamAddressRange> streamsAddressesRange) { Supplier<Map<UUID, StreamAddressSpace>> streamsAddressResponseSupplier = () -> layoutHelper(e -> CFUtils.getUninterruptibly(e.getPrimarySequencerClient() .getStreamsAddressSpace(streamsAddressesRange)).getAddressMap()); return streamAddressRangeTimer.map(timer -> timer.record(streamsAddressResponseSupplier)) .orElseGet(() -> streamsAddressResponseSupplier.get()); }
Source:
<code>private Range getRangeFromBehavior(String executionBehavior) { Range range; <START> int startRowLimit = 1; <END> int endRowLimit = docDisplay_.getRowCount(); Scope scope = docDisplay_.getCurrentChunk(); if (scope != null) { startRowLimit = scope.getBodyStart().getRow(); endRowLimit = scope.getEnd().getRow() - 1; } if (executionBehavior == UIPrefsAccessor.EXECUTE_STATEMENT) { range = docDisplay_.getMultiLineExpr( docDisplay_.getCursorPosition(), startRowLimit, endRowLimit); } else if (executionBehavior == UIPrefsAccessor.EXECUTE_PARAGRAPH) { range = docDisplay_.getParagraph( docDisplay_.getCursorPosition(), startRowLimit, endRowLimit); } else { int row = docDisplay_.getCursorPosition().getRow(); range = Range.fromPoints( Position.create(row, 0), Position.create(row, docDisplay_.getLength(row))); } return range; }</code><technical_language>this 0 1</technical_language>

Target:
private Range getRangeFromBehavior(String executionBehavior) { Range range; int startRowLimit = 0; int endRowLimit = docDisplay_.getRowCount(); Scope scope = docDisplay_.getCurrentChunk(); if (scope != null) { startRowLimit = scope.getBodyStart().getRow(); endRowLimit = scope.getEnd().getRow() - 1; } if (executionBehavior == UIPrefsAccessor.EXECUTE_STATEMENT) { range = docDisplay_.getMultiLineExpr( docDisplay_.getCursorPosition(), startRowLimit, endRowLimit); } else if (executionBehavior == UIPrefsAccessor.EXECUTE_PARAGRAPH) { range = docDisplay_.getParagraph( docDisplay_.getCursorPosition(), startRowLimit, endRowLimit); } else { int row = docDisplay_.getCursorPosition().getRow(); range = Range.fromPoints( Position.create(row, 0), Position.create(row, docDisplay_.getLength(row))); } return range; }
Source:
<code>void create(TreeLogger logger, JArrayType targetType) throws UnableToCompleteException { this.targetType = targetType; this.componentType = targetType.getComponentType(); if (componentType.isPrimitive() != null || SerializerCreator.isBoxedPrimitive(componentType)) { logger.log(TreeLogger.DEBUG, "No need to create array deserializer for primitive array " + targetType); return; } <START> if (deserializerFor(targetType) != null) return; <END> logger.log(TreeLogger.DEBUG, "Creating result deserializer for " + targetType.getSimpleSourceName()); final SourceWriter srcWriter = getSourceWriter(logger, context); if (srcWriter == null) return; final String dsn = getDeserializerQualifiedName(targetType); generatedDeserializers.put(targetType.getQualifiedSourceName(), dsn); generateSingleton(srcWriter); generateInstanceMembers(srcWriter); generateFromResult(srcWriter); srcWriter.commit(logger); }</code><technical_language>I try avoid cuddling statement line if. Instead statement force next lines, e.g.: if (deserializerFor(targetType) != null) { return; }</technical_language>

Target:
void create(TreeLogger logger, JArrayType targetType) throws UnableToCompleteException { this.targetType = targetType; this.componentType = targetType.getComponentType(); if (componentType.isPrimitive() != null || SerializerCreator.isBoxedPrimitive(componentType)) { logger.log(TreeLogger.DEBUG, "No need to create array deserializer for primitive array " + targetType); return; } if (deserializerFor(targetType) != null) { return; } logger.log(TreeLogger.DEBUG, "Creating result deserializer for " + targetType.getSimpleSourceName()); final SourceWriter srcWriter = getSourceWriter(logger, context); if (srcWriter == null) { return; } final String dsn = getDeserializerQualifiedName(targetType); generatedDeserializers.put(targetType.getQualifiedSourceName(), dsn); generateSingleton(srcWriter); generateInstanceMembers(srcWriter); generateFromResult(srcWriter); srcWriter.commit(logger); }
Source:
<code>private static String loadTaskForm(String taskForm) { String taskFormJson = ""; try { taskFormJson = Resources.toString(FormValuesProcessorTest.class.getResource(taskForm), Charsets.UTF_8); } catch (IOException e) { <START> e.printStackTrace(); <END> } return taskFormJson; }</code><technical_language>Also, do that, able return try block, reducing size of method a third</technical_language>

Target:
private static String loadTaskForm(String taskForm) throws IOException { return Resources.toString(FormValuesProcessorTest.class.getResource(taskForm), Charsets.UTF_8); }
Source:
<code><START> BingTile(int x, int y, int zoomLevel) <END> { this.x = x; this.y = y; this.zoomLevel = zoomLevel; }</code><technical_language>making this private adding a new static method fromCoordinates(x, y, zoomLevel)? construction static factories</technical_language>

Target:
private BingTile(int x, int y, int zoomLevel) { checkArgument(zoomLevel <= MAX_ZOOM_LEVEL); this.x = x; this.y = y; this.zoomLevel = zoomLevel; }
Source:
<code>private void resetRoutingTableAndNotify(long startTime, RoutingTable newRoutingTable) { _routingTableRef.set(newRoutingTable); String clusterName = _helixManager != null ? _helixManager.getClusterName() : null; logger.info("Refresh the RoutingTable for cluster {}, takes ms.", clusterName, (System.currentTimeMillis() - startTime)); <START> notifyRoutingTableChange(_helixManager != null ? _helixManager.getClusterName() : null); <END> if (_isPeriodicRefreshEnabled) { _lastRefreshTimestamp = System.currentTimeMillis(); } }</code><technical_language>"_helixManager != null ? _helixManager.getClusterName() : null" --> "clusterName"</technical_language>

Target:
private void resetRoutingTableAndNotify(long startTime, RoutingTable newRoutingTable) { _routingTableRef.set(newRoutingTable); String clusterName = _helixManager != null ? _helixManager.getClusterName() : null; logger.info("Refreshed the RoutingTable for cluster {}, took ms.", clusterName, (System.currentTimeMillis() - startTime)); notifyRoutingTableChange(clusterName); if (_isPeriodicRefreshEnabled) { _lastRefreshTimestamp = System.currentTimeMillis(); } }
Source:
<code>private PreparedStatement prepareStatementFromFieldsAndTableName() { if (tablename == null || tablename.length() == 0) { throw new RuntimeException("Please sepcify query or table name."); } StringBuilder queryfields = new StringBuilder(); StringBuilder values = new StringBuilder(); <START> for (FieldInfo fieldInfo : fieldInfos) { <END> if (queryfields.length() == 0) { queryfields.append(fieldInfo.getColumnName()); values.append("?"); } else { queryfields.append(",").append(fieldInfo.getColumnName()); values.append(",").append("?"); } } String statement = "INSERT INTO " + store.keyspace + "." + tablename + " (" + queryfields.toString() + ") " + "VALUES (" + values.toString() + ");"; return store.getSession().prepare(statement); }</code><technical_language>Please remove checkstyle related changes this PR</technical_language>

Target:
private PreparedStatement prepareStatementFromFieldsAndTableName() { if (tablename == null || tablename.length() == 0) { throw new RuntimeException("Please sepcify query or table name."); } StringBuilder queryfields = new StringBuilder(); StringBuilder values = new StringBuilder(); for (FieldInfo fieldInfo: fieldInfos) { if (queryfields.length() == 0) { queryfields.append(fieldInfo.getColumnName()); values.append("?"); } else { queryfields.append(",").append(fieldInfo.getColumnName()); values.append(",").append("?"); } } String statement = "INSERT INTO " + store.keyspace + "." + tablename + " (" + queryfields.toString() + ") " + "VALUES (" + values.toString() + ");"; LOG.debug("statement is {}", statement); return store.getSession().prepare(statement); }
Source:
<code>private String getClaims(String httpResponseContentStr) { JsonElement root = new JsonParser().parse(httpResponseContentStr); <START> String claims = root.getAsJsonObject().get("claims").getAsString(); <END> return claims; }</code><technical_language>getAsString() throw null pointer</technical_language>

Target:
private String getClaims(String httpResponseContentStr) { JsonElement root = new JsonParser().parse(httpResponseContentStr); JsonElement claims = root.getAsJsonObject().get("claims"); return claims != null ? claims.getAsString() : null; }
Source:
<code>public void test() { FileLinesContextFactory fileLinesContextFactory = mock(FileLinesContextFactory.class); DefaultFileSystem fileSystem = new DefaultFileSystem(Paths.get("")); FileLinesContext fileLinesContext = mock(FileLinesContext.class); File file = new File(BASE_DIR, "file_lines.py"); <START> DefaultInputFile inputFile = new DefaultInputFile(TestUtils.MODULE, file.getPath()); <END> fileSystem.add(inputFile); when(fileLinesContextFactory.createFor(inputFile)).thenReturn(fileLinesContext); SquidAstVisitor<Grammar> visitor = new FileLinesVisitor(fileLinesContextFactory, fileSystem); PythonAstScanner.scanSingleFile(file, visitor); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 1, 0); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 2, 1); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 3, 0); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 4, 1); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 5, 0); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 1, 1); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 2, 0); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 3, 0); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 4, 1); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 5, 0); verify(fileLinesContext).save(); verifyNoMoreInteractions(fileLinesContext); }</code><technical_language>@ivandalbosco replace TestUtils.MODULE "" "moduleKey"</technical_language>

Target:
public void test() { FileLinesContextFactory fileLinesContextFactory = mock(FileLinesContextFactory.class); DefaultFileSystem fileSystem = new DefaultFileSystem(Paths.get("")); FileLinesContext fileLinesContext = mock(FileLinesContext.class); File file = new File(BASE_DIR, "file_lines.py"); DefaultInputFile inputFile = new DefaultInputFile("", file.getPath()); fileSystem.add(inputFile); when(fileLinesContextFactory.createFor(inputFile)).thenReturn(fileLinesContext); SquidAstVisitor<Grammar> visitor = new FileLinesVisitor(fileLinesContextFactory, fileSystem); PythonAstScanner.scanSingleFile(file, visitor); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 1, 0); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 2, 1); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 3, 0); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 4, 1); verify(fileLinesContext).setIntValue(CoreMetrics.NCLOC_DATA_KEY, 5, 0); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 1, 1); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 2, 0); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 3, 0); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 4, 1); verify(fileLinesContext).setIntValue(CoreMetrics.COMMENT_LINES_DATA_KEY, 5, 0); verify(fileLinesContext).save(); verifyNoMoreInteractions(fileLinesContext); }
Source:
<code>public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) { if (!isPackage(qualifiedPackageName)) return null; try { IBinaryType reader = ClassFileReader.read(this.zipFile, qualifiedBinaryFileName); if (reader != null) { if (this.annotationPaths != null) { String qualifiedClassName = qualifiedBinaryFileName.substring(0, qualifiedBinaryFileName.length()-SuffixConstants.EXTENSION_CLASS.length()-1); for (String annotationPath : this.annotationPaths) { try { if (this.annotationZipFile == null) { this.annotationZipFile = ClassWithExternalAnnotations.getAnnotationZipFile(annotationPath, null); } IBinaryType nextReader = ClassWithExternalAnnotations.create(reader, annotationPath, qualifiedClassName, this.annotationZipFile); if <START> (nextReader.getExternalAnnotationStatus() == ExternalAnnotationStatus.TYPE_IS_ANNOTATED) { <END> reader = nextReader; break; } } catch (IOException e) { } } } return new NameEnvironmentAnswer(reader, fetchAccessRestriction(qualifiedBinaryFileName)); } } catch(ClassFormatException e) { } catch (IOException e) { } return null; }</code><technical_language>this test clumsy: do create a wrapper, inspect state of wrapper determine is necessary? is wrong ignore a wrapper? this method signal: "eea configured, for this type"?</technical_language>

Target:
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) { if (!isPackage(qualifiedPackageName)) return null; try { IBinaryType reader = ClassFileReader.read(this.zipFile, qualifiedBinaryFileName); if (reader != null) { if (this.annotationPaths != null) { String qualifiedClassName = qualifiedBinaryFileName.substring(0, qualifiedBinaryFileName.length()-SuffixConstants.EXTENSION_CLASS.length()-1); for (String annotationPath : this.annotationPaths) { try { if (this.annotationZipFile == null) { this.annotationZipFile = ClassWithExternalAnnotations.getAnnotationZipFile(annotationPath, null); } reader = ClassWithExternalAnnotations.create(reader, annotationPath, qualifiedClassName, this.annotationZipFile); if (reader.getExternalAnnotationStatus() == ExternalAnnotationStatus.TYPE_IS_ANNOTATED) { break; } } catch (IOException e) { } } } return new NameEnvironmentAnswer(reader, fetchAccessRestriction(qualifiedBinaryFileName)); } } catch(ClassFormatException e) { } catch (IOException e) { } return null; }
Source:
<code>public void testIdleExpiryInPutAll() throws InterruptedException { Cache<String, String> cache = cm.getCache(); final long idleTime = EXPIRATION_TIMEOUT; Map<String, String> m = new HashMap<String, String>(); m.put("k1", "v"); m.put("k2", "v"); long start = now(); cache.putAll(m, -1, MILLISECONDS, idleTime, MILLISECONDS); assert "v".equals(cache.get("k1")) || moreThanLifespanElapsed(start, idleTime); <START> assert "v".equals(cache.get("k2")) || moreThanLifespanElapsed(start, idleTime); <END> Thread.sleep(idleTime + 100); assert cache.get("k1") == null; assert cache.get("k2") == null; }</code><technical_language>assertEquals, this: if (!moreThanLifespanElapsed(...)) assertEquals(cache.get(...), "v"))</technical_language>

Target:
public void testIdleExpiryInPutAll() throws InterruptedException { Cache<String, String> cache = cm.getCache(); final long idleTime = EXPIRATION_TIMEOUT; Map<String, String> m = new HashMap<String, String>(); m.put("k1", "v"); m.put("k2", "v"); long start = now(); cache.putAll(m, -1, MILLISECONDS, idleTime, MILLISECONDS); assert "v".equals(cache.get("k1")) || moreThanDurationElapsed(start, idleTime); assert "v".equals(cache.get("k2")) || moreThanDurationElapsed(start, idleTime); Thread.sleep(idleTime + 100); assert cache.get("k1") == null; assert cache.get("k2") == null; }
Source:
<code>Store.ValueHolder<V> getOrComputeIfAbsent(K key, Function<K, Store.ValueHolder<V>> source) throws CacheAccessException; void invalidate(K key) throws CacheAccessException; <START> void invalidate(K key, NullaryFunction<K> invalidator) throws CacheAccessException; <END> void invalidate() throws CacheAccessException; void setInvalidationListener(InvalidationListener<K, V> invalidationListener); interface InvalidationListener<K, V> { void onInvalidation(K key, Store.ValueHolder<V> valueHolder); }</code><technical_language>I name this param invalidator, do anything... a NullaryFunction invoked lock scope (iirc, irrespectively of a mapping there, right?)</technical_language>

Target:
Store.ValueHolder<V> getOrComputeIfAbsent(K key, Function<K, Store.ValueHolder<V>> source) throws CacheAccessException; void invalidate(K key) throws CacheAccessException; void invalidate(K key, NullaryFunction<K> function) throws CacheAccessException; void invalidate() throws CacheAccessException; void setInvalidationListener(InvalidationListener<K, V> invalidationListener); interface InvalidationListener<K, V> { void onInvalidation(K key, Store.ValueHolder<V> valueHolder); }
Source:
<code>@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); <START> if (client) <END> ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setForceServerMode(true); cfg.setUserAttributes(F.asMap(TEST_ATTRIBUTE_NAME, testAttribute)); CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME); cacheCfg.setCacheMode(CacheMode.REPLICATED); cacheCfg.setName(STATIC_CACHE_NAME); cfg.setCacheConfiguration(cacheCfg); cfg.setIncludeEventTypes(EventType.EVT_CACHE_STARTED, EventType.EVT_CACHE_STOPPED, EventType.EVT_CACHE_NODES_LEFT); if (daemon) cfg.setDaemon(true); return cfg; }</code><technical_language>If I correct, replace this if (cfg.isClientMode()) remove 'client' field all</technical_language>

Target:
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); if (cfg.isClientMode()) ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setForceServerMode(true); cfg.setUserAttributes(F.asMap(TEST_ATTRIBUTE_NAME, testAttribute)); CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME); cacheCfg.setCacheMode(CacheMode.REPLICATED); cacheCfg.setName(STATIC_CACHE_NAME); cfg.setCacheConfiguration(cacheCfg); cfg.setIncludeEventTypes(EventType.EVT_CACHE_STARTED, EventType.EVT_CACHE_STOPPED, EventType.EVT_CACHE_NODES_LEFT); if (daemon) cfg.setDaemon(true); return cfg; }
Source:
<code>public void update(@NotNull final String host, @NotNull final int hport, @NotNull final String server, @NotNull final int sport) { try { new Shell.Plain( new SSH( Manifests.read("Thindeck-LoadBalancer-Host"), Integer.parseInt( Manifests.read("Thindeck-LoadBalancer-Port") ), Manifests.read("Thindeck-LoadBalancer-User"), FileUtils.readFileToString( new File( Manifests.read("Thindeck-LoadBalancer-Key-File") ) ) ) ).exec( Joiner.on(";").join( String.format( "cd %s", Manifests.read("Thindeck-LoadBalancer-Directory") ), "TMPFILE=`mktemp`", String.format( "cat %s.hosts.conf | sed -r 's/}/ server %s:%d;\\n}/' > $TMPFILE", host, server, sport ), String.format("mv $TMPFILE %s.hosts.conf", host), <START> "pkill -HUP -f ngnix" <END> ) ); } catch (final UnknownHostException ex) { throw new IllegalStateException(ex); } catch (final IOException ex) { throw new IllegalStateException(ex); } }</code><technical_language>fixed command. wrote ngnix nginx</technical_language>

Target:
public void update(@NotNull final String host, @NotNull final int hport, @NotNull final String server, @NotNull final int sport) { try { new Shell.Plain( new SSH( Manifests.read("Thindeck-LoadBalancer-Host"), Integer.parseInt( Manifests.read("Thindeck-LoadBalancer-Port") ), Manifests.read("Thindeck-LoadBalancer-User"), FileUtils.readFileToString( new File( Manifests.read("Thindeck-LoadBalancer-Key-File") ) ) ) ).exec( Joiner.on(";").join( String.format( "cd %s", Manifests.read("Thindeck-LoadBalancer-Directory") ), "TMPFILE=`mktemp`", String.format( "cat %s.hosts.conf | sed -r 's/}/ server %s:%d;\\n}/' > $TMPFILE", host, server, sport ), String.format("mv $TMPFILE %s.hosts.conf", host), "pkill -HUP -f nginx" ) ); } catch (final UnknownHostException ex) { throw new IllegalStateException(ex); } catch (final IOException ex) { throw new IllegalStateException(ex); } }
Source:
<code>private void appendOffsets() { ensureOffsetsBufferSize(); <START> int baseOffset = getLastOffsetInBuffer(); <END> if (positionsOffset > 0) { baseOffset -= offsets[positionsOffset - 1]; } for (int i = positionsOffset; i < positionsOffset + batchSize; i++) { int currentOffset = offsets[i]; ByteArrayUtils.writeInt(offsetsBuffer, offsetsBufferIndex, currentOffset + baseOffset); offsetsBufferIndex += ARRAY_INT_INDEX_SCALE; } verify(offsetsBufferIndex == (bufferedPositionCount + batchSize) * ARRAY_INT_INDEX_SCALE); }</code><technical_language>inline getLastOffsetInBuffer</technical_language>

Target:
private void appendOffsets() { ensureOffsetsBufferCapacity(); int baseOffset = lastOffset - offsets[positionsOffset]; for (int i = positionsOffset; i < positionsOffset + batchSize; i++) { offsetsBufferIndex = setInt(offsetsBuffer, offsetsBufferIndex, offsets[i + 1] + baseOffset); } lastOffset = offsets[positionsOffset + batchSize] + baseOffset; }
Source:
<code>if (tempBT == 0) { <START> tempBT = (long) ProcUtil.getSystemUptimeSeconds(); <END> }</code><technical_language>subtracting current time here</technical_language>

Target:
if (tempBT == 0) { tempBT = System.currentTimeMillis() / 1000L - (long) ProcUtil.getSystemUptimeSeconds(); }
Source:
<code>public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { Command command = (Command) msg; command.setChannelHandlerContext(ctx); <START> commandQueue.offer(command); <END> }</code><technical_language>put instead of offer</technical_language>

Target:
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { Command command = (Command) msg; command.setChannelHandlerContext(ctx); commandQueue.put(command); }
Source:
<code>public void buildReport(ActionManager manager) { TreeFilteringResourceVisitor visitor = new TreeFilteringResourceVisitor(); visitor.setBreadthFirstMode(); visitor.setTraversalFilter(null); visitor.setResourceVisitor((resource, depth) -> { <START> Map<String, List<String>> brokenRefs = collectBrokenReferences(resource, regex, excludeList, deepCheckList); <END> for(Map.Entry<String, List<String>> ref : brokenRefs.entrySet()){ String propertyPath = ref.getKey(); List<String> refs = ref.getValue(); reportData.put(propertyPath, new EnumMap<>(REPORT.class)); reportData.get(propertyPath).put(REPORT.reference, refs.stream().collect(Collectors.joining(","))); } }); manager.deferredWithResolver(rr -> visitor.accept(rr.getResource(sourcePath))); }</code><technical_language>This part wrapped manager.deferredWithResolver well, this is divide work speed in parallel. part deferred is benefit error handling more else</technical_language>

Target:
public void buildReport(ActionManager manager) { TreeFilteringResourceVisitor visitor = new TreeFilteringResourceVisitor(); visitor.setBreadthFirstMode(); visitor.setTraversalFilter(null); visitor.setResourceVisitor((resource, depth) -> { manager.deferredWithResolver(rr -> { Map<String, List<String>> brokenRefs = collectBrokenReferences(resource, regex, excludeList, deepCheckList); for(Map.Entry<String, List<String>> ref : brokenRefs.entrySet()){ String propertyPath = ref.getKey(); List<String> refs = ref.getValue(); reportData.put(propertyPath, new EnumMap<>(REPORT.class)); reportData.get(propertyPath).put(REPORT.reference, refs.stream().collect(Collectors.joining(","))); } }); }); manager.deferredWithResolver(rr -> visitor.accept(rr.getResource(sourcePath))); }
Source:
<code>public void testRotateTicketSeedFile() throws InterruptedException, IOException { startServer(); OpenSslServerConfiguration config = (OpenSslServerConfiguration) server.getSSLConfiguration(); List<SessionTicketKey> actual = ImmutableList.copyOf(config.ticketKeys); List<SessionTicketKey> expected = new TicketSeedFileParser().parse(getTicketSeedFile()); assertTicketKeysEqual(actual, expected); updateTicketSeedFile(getResourceFileContents(Plain.class, "/ticket_seeds2.json")); <START> Thread.sleep(300); END> config = (OpenSslServerConfiguration) server.getSSLConfiguration(); List<SessionTicketKey> actual2 = ImmutableList.copyOf(config.ticketKeys); List<SessionTicketKey> expected2 = new TicketSeedFileParser().parse(getTicketSeedFile()); assertTicketKeysEqual(actual2, expected2); Assert.assertNotEquals(actual.get(0).getName(), actual2.get(0).getName()); }</code><technical_language>some do this other sleep(300) is prone timing bugs? ask testwatcher cycle is on</technical_language>

Target:
public void testRotateTicketSeedFile() throws InterruptedException, IOException { startServer(); OpenSslServerConfiguration config = (OpenSslServerConfiguration) server.getSSLConfiguration(); List<SessionTicketKey> actual = ImmutableList.copyOf(config.ticketKeys); List<SessionTicketKey> expected = new TicketSeedFileParser().parse(getTicketSeedFile()); assertTicketKeysEqual(actual, expected); long callbacksSucceeded = fileWatcher.getStats().getCallbacksSucceeded(); updateTicketSeedFile(getResourceFileContents(Plain.class, "/ticket_seeds2.json")); while (fileWatcher.getStats().getCallbacksSucceeded() < callbacksSucceeded + 1) { Thread.sleep(25); } config = (OpenSslServerConfiguration) server.getSSLConfiguration(); List<SessionTicketKey> actual2 = ImmutableList.copyOf(config.ticketKeys); List<SessionTicketKey> expected2 = new TicketSeedFileParser().parse(getTicketSeedFile()); assertTicketKeysEqual(actual2, expected2); Assert.assertNotEquals(actual.get(0).getName(), actual2.get(0).getName()); }
Source:
<code>@Override public String getDescription() { <START> return "Setup okbuck cache and dependencies"; <END> }</code><technical_language>This handled setupOkbuck Task. root okbuck task description more "okbuck task for root project"</technical_language>

Target:
@Override public String getDescription() { return "Okbuck task for the root project. Also sets up groovy and kotlin if required."; }
Source:
<code>private static Map<Integer, RexLiteral> getAllColumnValuePairs(RexCall call) { if (call.isA(SqlKind.AND)) { return call.getOperands().stream().flatMap(entry -> { if (entry instanceof RexCall) { <START> final Pair<Integer, RexLiteral> p = getColumnValuePairs((RexCall) entry); <END> if (p != null) { return Stream.of(p); } } return Stream.empty(); }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond, (a, b) -> a)); } else { final Map<Integer, RexLiteral> m = new HashMap<>(); final Pair<Integer, RexLiteral> p = getColumnValuePairs(call); if (p != null) { m.put(p.getFirst(), p.getSecond()); } return m; } }</code><technical_language>if getColumnValuePairs return Optional (possible empty) getOrElse complete a stream instead of if (p != null) check</technical_language>

Target:
private static Map<Integer, RexNode> getAllColumnValuePairs(RexCall call) { if (call.isA(SqlKind.AND)) { return call.getOperands().stream().flatMap(entry -> { if (entry instanceof RexCall) { return getColumnValuePairs((RexCall) entry); } else { return Stream.empty(); } }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond, (a, b) -> a)); } else { final Map<Integer, RexNode> m = new HashMap<>(); getColumnValuePairs(call).findAny().ifPresent(p -> m.put(p.getFirst(), p.getSecond())); return m; } }
Source:
<code>public void tryAssembleMergedConfig(GoConfigHolder cruiseConfigHolder,List<PartialConfig> partials) { try { GoConfigHolder newConfigHolder; if (partials.size() == 0) { newConfigHolder = cruiseConfigHolder; } else { BasicCruiseConfig merge = new BasicCruiseConfig((BasicCruiseConfig) cruiseConfigHolder.config, partials); List<ConfigErrors> allErrors = validate(merge); if (!allErrors.isEmpty()) { throw new GoConfigInvalidException(merge, allErrors); } CruiseConfig basicForEdit = this.fileService.loadForEditing(); CruiseConfig forEdit = new BasicCruiseConfig((BasicCruiseConfig) basicForEdit, partials); newConfigHolder = new GoConfigHolder(merge, forEdit); } this.saveValidConfigToCacheAndNotifyConfigChangeListeners(newConfigHolder); } catch (Exception e) { <START> LOGGER.error("Failed validation of merged configuration: {}", e); <END> saveConfigError(e); } }</code><technical_language>is parameter substituted here. if bombs happens. This overridden method public void error(String msg, Throwable t); Right</technical_language>

Target:
public void tryAssembleMergedConfig(GoConfigHolder cruiseConfigHolder,List<PartialConfig> partials) { try { GoConfigHolder newConfigHolder; if (partials.size() == 0) { newConfigHolder = cruiseConfigHolder; } else { BasicCruiseConfig merge = new BasicCruiseConfig((BasicCruiseConfig) cruiseConfigHolder.config, partials); List<ConfigErrors> allErrors = validate(merge); if (!allErrors.isEmpty()) { throw new GoConfigInvalidException(merge, allErrors); } CruiseConfig basicForEdit = this.fileService.loadForEditing(); CruiseConfig forEdit = new BasicCruiseConfig((BasicCruiseConfig) basicForEdit, partials); newConfigHolder = new GoConfigHolder(merge, forEdit); } this.saveValidConfigToCacheAndNotifyConfigChangeListeners(newConfigHolder); } catch (Exception e) { LOGGER.error("Failed validation of merged configuration: {}", e.toString()); saveConfigError(e); } }
Source:
<code>public void onClicked(MouseEvent event) { if (event.getButton().equals(MouseButton.SECONDARY)) { dismiss(); } else { if (!StageHolder.getStage().isFocused()) { StageHolder.getStage().setIconified(false); <START> StageHolder.getStage().requestFocus(); <END> } action.call(event); } }</code><technical_language>call StageHolder.getStage() repeatedly, extract variable (select, CTRL+ALT+V)</technical_language>

Target:
public void onClicked(MouseEvent event) { if (event.getButton().equals(MouseButton.SECONDARY)) { dismiss(); } else { action.call(event); } }
Source:
<code>public void testConfigProviderRegex() { testConfigProviderRegex("${file:/tmp/somefile.txt:somevar}"); testConfigProviderRegex("\"${file:/tmp/somefile.txt:somevar}\""); testConfigProviderRegex("plain.PlainLoginModule required username=\"${file:/tmp/somefile.txt:somevar}\""); <START> testConfigProviderRegex("plain.PlainLoginModule required username=${file:/tmp/somefile.txt:somevar}"); <END> testConfigProviderRegex("plain.PlainLoginModule required username", false); }</code><technical_language>Excellent</technical_language>

Target:
public void testConfigProviderRegex() { testConfigProviderRegex("\"${::}\""); testConfigProviderRegex("${::}"); testConfigProviderRegex("\"${:/a:somevar}\""); testConfigProviderRegex("\"${file::somevar}\""); testConfigProviderRegex("${file:/a/b/c:}"); testConfigProviderRegex("${file:/tmp/somefile.txt:somevar}"); testConfigProviderRegex("\"${file:/tmp/somefile.txt:somevar}\""); testConfigProviderRegex("plain.PlainLoginModule required username=\"${file:/tmp/somefile.txt:somevar}\""); testConfigProviderRegex("plain.PlainLoginModule required username=${file:/tmp/somefile.txt:somevar}"); testConfigProviderRegex("plain.PlainLoginModule required username=${file:/tmp/somefile.txt:somevar} not null"); testConfigProviderRegex("plain.PlainLoginModule required username=${file:/tmp/somefile.txt:somevar} password=${file:/tmp/somefile.txt:othervar}"); testConfigProviderRegex("plain.PlainLoginModule required username", false); }
Source:
<code>public List<OrganizationType> getAllOrganizations(String exchangeName) throws ExchangeManagerException { refreshExchangeCacheIfRequired(); <START> return null != exchangeName ? new ArrayList<>(getCache().get(exchangeName).values()) <END> : new ArrayList<>(getCache().get(this.getDefaultExchange()).values()); }</code><technical_language>if put (null !=exchange) reading more easier? If not, worry</technical_language>

Target:
public List<OrganizationType> getAllOrganizations(String exchangeName) throws ExchangeManagerException { refreshExchangeCacheIfRequired(); return (null != exchangeName) ? new ArrayList<>(getCache().get(exchangeName).values()) : new ArrayList<>(getCache().get(this.getDefaultExchange()).values()); }
Source:
<code>public AlarmState alarm() { <START> System.out.println(name + ": " + currentAlarmState); <END> return currentAlarmState; }</code><technical_language>Do need log this? is logged framework</technical_language>

Target:
public AlarmState alarm() { return currentAlarmState; }
Source:
<code>public void verifyCommentFormErrorMessage(String commentTableIdSuffix, String errorMessage) { WebElement errorMessageSpan = waitForElementPresence( <START> By.cssSelector("#responseCommentTable" + commentTableIdSuffix + " .col-sm-offset-5 #errorMessage")); <END> assertEquals(errorMessage, errorMessageSpan.getText()); }</code><technical_language>fault, if selector is this way, #errorMessage obsolete</technical_language>

Target:
public void verifyCommentFormErrorMessage(String commentTableIdSuffix, String errorMessage) { WebElement errorMessageSpan = waitForElementPresence(By.cssSelector("#errorMessage")); assertEquals(errorMessage, errorMessageSpan.getText()); }
Source:
<code>public void postExecution(ActionEvaluationResponse response) { if(null != response.getException()) { eventBus.publish(new QueryProcessingError(response.getRequest(), response.getException())); } <START> eventBus.publish(new QueryProcessed(response.getRequest(), response.getResponse(), response.getElapsedTime())); <END> }</code><technical_language>of events raised I think</technical_language>

Target:
public void postExecution(ActionEvaluationResponse response) { if(null != response.getException()) { eventBus.publish(new QueryProcessingError(response.getRequest(), response.getException())); } else { eventBus.publish(new QueryProcessed(response.getRequest(), response.getResponse(), response.getElapsedTime())); } }
Source:
<code>public void testNeedsRepositoryCredentialsPageCompletesWithoutCredentials() { TaskRepository repository = new TaskRepository(MockRepositoryConnector.CONNECTOR_KIND, "http://localhost/"); MockRepositorySettingsPage page = new MockRepositorySettingsPage(repository); page.setNeedsRepositoryCredentials(false); try { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); page.createControl(shell); <START> page.setUrl("<LINK_0>"); <END> assertTrue(page.isPageComplete()); assertNull(page.getMessage()); assertNotNull(page.createTaskRepository()); } finally { page.dispose(); } }</code><technical_language>assert credentials created</technical_language>

Target:
public void testNeedsRepositoryCredentialsPageCompletesWithoutCredentials() { TaskRepository repository = new TaskRepository(MockRepositoryConnector.CONNECTOR_KIND, "http://localhost/"); MockRepositorySettingsPage page = new MockRepositorySettingsPage(repository); page.setNeedsRepositoryCredentials(false); try { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); page.createControl(shell); page.setUrl("<LINK_0>"); assertNull(page.getRepositoryUserNameEditor()); assertNull(page.getRepositoryPasswordEditor()); assertTrue(page.isPageComplete()); assertNull(page.getMessage()); assertNotNull(page.createTaskRepository()); } finally { page.dispose(); } }
Source:
<code>public CellIdentityCdma() { <START> super(CellIdentityCdma.class.getSimpleName(), TYPE_CDMA, <END> null, null); mNetworkId = Integer.MAX_VALUE; mSystemId = Integer.MAX_VALUE; mBasestationId = Integer.MAX_VALUE; mLongitude = Integer.MAX_VALUE; mLatitude = Integer.MAX_VALUE; mAlphaLong = null; mAlphaShort = null; }</code><technical_language>TAG</technical_language>

Target:
public CellIdentityCdma() { super(TAG, TYPE_CDMA, null, null); mNetworkId = Integer.MAX_VALUE; mSystemId = Integer.MAX_VALUE; mBasestationId = Integer.MAX_VALUE; mLongitude = Integer.MAX_VALUE; mLatitude = Integer.MAX_VALUE; mAlphaLong = null; mAlphaShort = null; }
Source:
<code>public SecurityInfoBuilder id(SecurityId id) { <START> this.id = id; <END> return this; }</code><technical_language>do null checks in builder methods? happy wait build is called blowing up</technical_language>

Target:
public SecurityInfoBuilder id(SecurityId id) { this.id = ArgChecker.notNull(id, "id"); return this; }
Source:
<code>private void cancelCurrentRequest() { <START> this.bufferedContent = null; <END> this.bufferedContentReadOffset = 0; this.bytesToSkipBeforeReading = 0; if (requestContext != null) { requestContext.close(); requestContext = null; } if (resIterator != null) { resIterator = null; } }</code><technical_language>this. prefix in constructors setters, please remove if possible</technical_language>

Target:
private void cancelCurrentRequest() { bufferedContent = null; bufferedContentReadOffset = 0; bytesToSkipBeforeReading = 0; if (requestContext != null) { requestContext.close(); requestContext = null; } if (resIterator != null) { resIterator = null; } }
Source:
<code>private void appendMissingSegment(ResponseContext responseContext) { <START> List<SegmentDescriptor> missingSegments = <END> (List<SegmentDescriptor>) responseContext.get(ResponseContext.CTX_MISSING_SEGMENTS_KEY); if (missingSegments == null) { missingSegments = new ArrayList<>(); responseContext.put(ResponseContext.CTX_MISSING_SEGMENTS_KEY, missingSegments); } missingSegments.add(specificSpec.getDescriptor()); }</code><technical_language>explore if this method belong ResponseContext? - This block computeIfAbsent()</technical_language>

Target:
private void appendMissingSegment(ResponseContext responseContext) { List<SegmentDescriptor> missingSegments = (List<SegmentDescriptor>) responseContext.get(ResponseContext.CTX_MISSING_SEGMENTS); if (missingSegments == null) { missingSegments = new ArrayList<>(); responseContext.put(ResponseContext.CTX_MISSING_SEGMENTS, missingSegments); } missingSegments.add(specificSpec.getDescriptor()); }
Source:
<code>public T get(final FindOptions options) { final MorphiaIterator<T, T> it = fetch(options .copy() .limit(1)); T t = (it.hasNext()) ? it.next() : null; <START> it.close(); <END> return t; }</code><technical_language>If add a close do in a finally block</technical_language>

Target:
public T get(final FindOptions options) { final MorphiaIterator<T, T> it = fetch(options .copy() .limit(1)); try { return (it.hasNext()) ? it.next() : null; } finally { it.close(); } }
Source:
<code><START> public void loadLibs(Context context) throws UnsatisfiedLinkError { <END> SQLiteDatabase.loadLibs(context); }</code><technical_language>static</technical_language>

Target:
public static void loadLibs(Context context) throws UnsatisfiedLinkError { SQLiteDatabase.loadLibs(context); }
Source:
<code>static ByteBuf createExplicitLACEntry(long ledgerId, ByteBuf explicitLac) { <START> ByteBuf bb = Unpooled.buffer(8 + 8 + 4 + explicitLac.capacity()); <END> bb.writeLong(ledgerId); bb.writeLong(METAENTRY_ID_LEDGER_EXPLICITLAC); bb.writeInt(explicitLac.capacity()); bb.writeBytes(explicitLac); return bb; }</code><technical_language>I a pooled bytebuf</technical_language>

Target:
static ByteBuf createExplicitLACEntry(long ledgerId, ByteBuf explicitLac) { ByteBuf bb = PooledByteBufAllocator.DEFAULT.directBuffer(8 + 8 + 4 + explicitLac.capacity()); bb.writeLong(ledgerId); bb.writeLong(METAENTRY_ID_LEDGER_EXPLICITLAC); bb.writeInt(explicitLac.capacity()); bb.writeBytes(explicitLac); return bb; }
Source:
<code>public InternalRemoteRemoteObject createRemoteObject(RemoteObject<?> remoteObject, String name, boolean rebind) throws ProActiveException { throwIfAgentIsNul("createRemoteObject call failed"); try { if (!name.startsWith("/")) { name = "/" + name; } <START> String publicAddress = ProActiveInet.getPublicAddress(), uriUserInfo; <END> if (publicAddress != null) { uriUserInfo = (PNPPublicPort != -1) ? ProActiveInet.getPublicAddress() + ':' + PNPPublicPort : ProActiveInet.getPublicAddress(); } else uriUserInfo = null; URI uri = new URI(this.getProtocolId(), uriUserInfo, URIBuilder.getHostNameorIP(this.agent.getInetAddress()), this.agent.getPort(), name, null, null); InternalRemoteRemoteObject irro = new InternalRemoteRemoteObjectImpl(remoteObject, uri); RemoteRemoteObject rmo = register(irro, uri, rebind); irro.setRemoteRemoteObject(rmo); return irro; } catch (URISyntaxException e) { throw new PNPException("Failed to create remote object " + name, e); } }</code><technical_language>initialize uriUserInfo null avoid else below</technical_language>

Target:
public InternalRemoteRemoteObject createRemoteObject(RemoteObject<?> remoteObject, String name, boolean rebind) throws ProActiveException { throwIfAgentIsNul("createRemoteObject call failed"); try { if (!name.startsWith("/")) { name = "/" + name; } String publicAddress = ProActiveInet.getPublicAddress(), uriUserInfo = null; if (publicAddress != null) { if (pnpPublicPort != -1) { uriUserInfo = ProActiveInet.getPublicAddress() + ':' + pnpPublicPort; } else uriUserInfo = ProActiveInet.getPublicAddress(); } URI uri = new URI(this.getProtocolId(), uriUserInfo, URIBuilder.getHostNameorIP(this.agent.getInetAddress()), this.agent.getPort(), name, null, null); InternalRemoteRemoteObject irro = new InternalRemoteRemoteObjectImpl(remoteObject, uri); RemoteRemoteObject rmo = register(irro, uri, rebind); irro.setRemoteRemoteObject(rmo); return irro; } catch (URISyntaxException e) { throw new PNPException("Failed to create remote object " + name, e); } }
Source:
<code>public static String getName() { <START> return "Custom Activity"; <END> }</code><technical_language>another name here. suggestion is: Asset Options</technical_language>

Target:
public static String getName() { return "Asset Options"; }