auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public List<DirectoryEntry> getCurrentPage() { Object[] parameters = getParameters(); if (parameters == null || parameters.length > 1) { throw new IllegalStateException("Invalid Parameters"); } if (!(parameters[0] instanceof Directory)) { throw new IllegalStateException("Provided Parameter is not a Directory"); } Directory directory = (Directory) parameters[0]; try (Session session = directory.getSession()) { return session.query(Collections.emptyMap() , Collections.emptySet() , Collections.emptyMap() , false , Long.valueOf(getPageSize()).intValue() , Long.valueOf(getCurrentPageOffset()).intValue()) .stream() .map((dir) -> new DirectoryEntry(directory.getName(), dir)) <START> .collect(Collectors.toList()); <END> } }</code><technical_language>Yes, sorry, forgot that... copyright</technical_language>

Target:
public List<DirectoryEntry> getCurrentPage() { Object[] parameters = getParameters(); if (parameters == null || parameters.length > 1) { throw new IllegalStateException("Invalid parameters: " + Arrays.toString(parameters)); } if (!(parameters[0] instanceof Directory)) { throw new IllegalStateException("Provided parameter is not a Directory: " + parameters[0]); } Directory directory = (Directory) parameters[0]; try (Session session = directory.getSession()) { return session.query(Collections.emptyMap(), Collections.emptySet(), Collections.emptyMap(), false, (int) getPageSize(), (int) getCurrentPageOffset()) .stream() .map(dir -> new DirectoryEntry(directory.getName(), dir)) .collect(Collectors.toList()); } }
Source:
<code>public TransientState(IStateHistoryBackend backend) { <START> this.fBackend = backend; <END> fIsActive = true; fOngoingStateInfo = new ArrayList<>(); fOngoingStateStartTimes = new ArrayList<>(); fStateValueTypes = new ArrayList<>(); fLatestTime = backend.getStartTime(); }</code><technical_language>remove "this." names</technical_language>

Target:
public TransientState(IStateHistoryBackend backend) { fBackend = backend; fIsActive = true; fOngoingStateInfo = new ArrayList<>(); fOngoingStateStartTimes = new ArrayList<>(); fStateValueTypes = new ArrayList<>(); fLatestTime = backend.getStartTime(); }
Source:
<code>public void throwsWhenPreprocessingConfigWithKeyspaceAndDifferentNamespace() { assertThatThrownBy( <START> () -> CassandraAtlasDbFactory.preprocessKvsConfig(CONFIG_WITH_KEYSPACE, Optional.of(KEYSPACE))) <END> .isInstanceOf(IllegalArgumentException.class); }</code><technical_language>reading this line expect this test pass. name this CONFIG_WITH_KEYSPACE_2, CONFIG_WITH_KEYSPACE receive KEYSPACE compare KEYSPACE_2</technical_language>

Target:
public void throwsWhenPreprocessingConfigWithKeyspaceAndDifferentNamespace() { assertThatThrownBy( () -> CassandraAtlasDbFactory.preprocessKvsConfig(CONFIG_WITH_KEYSPACE, Optional.of(KEYSPACE_2))) .isInstanceOf(IllegalArgumentException.class); }
Source:
<code>public void select_shoud_return_false_when_notAConnector(){ Task task = ProcessFactory.eINSTANCE.createTask(); <START> assertFalse(onFinishFilter.select(viewer, null, task)); <END> }</code><technical_language>(see TaskBuilder)</technical_language>

Target:
public void select_shoud_return_false_when_notAConnector() { final ConnectorEventFilter onFinishFilter = createConnectorEventFilter(); assertFalse(onFinishFilter.select(viewer, null, aTask().build())); }
Source:
<code>public void shouldReturnAPIExceptionWhenObsIsNull(){ ObsService os = Context.getObsService(); <START> Obs o = os.saveObs(null,"Null Obs"); <END> }</code><technical_language>a junit @Rule ExpectedException? check message exception thrown for else APIExceptions thrown code base</technical_language>

Target:
public void shouldReturnAPIExceptionWhenObsIsNull(){ expectedException.expect(APIException.class); expectedException.expectMessage(Context.getMessageSourceService().getMessage("Obs.error.cannot.be.null")); ObsService os = Context.getObsService(); Obs o = os.saveObs(null,"Null Obs"); }
Source:
<code>public ItineraryFilter build() { List<ItineraryFilter> filters = new ArrayList<>(); filters.add(new LongTransitWalkingFilter()); filters.add(new GroupByFilter<>( "groupBy-legs-filter-on-cost", it -> new GroupByLongestLegsId(it, groupByP), new SortOnGeneralizedCost(groupByTransferCost), minLimit )); if (latestDepartureTimeLimit != null) { filters.add(new LatestDepartureTimeFilter(latestDepartureTimeLimit)); } filters.add(new SortOnWalkingArrivalAndDeparture()); if (maxLimit >= minLimit) { filters.add(new MaxLimitFilter("MAX", maxLimit)); } if(debug) { <START> filters = addDebugWrppers(filters); <END> } return new FilterChain(filters); }</code><technical_language>Typo: Wrppers => Wrappers</technical_language>

Target:
public ItineraryFilter build() { List<ItineraryFilter> filters = new ArrayList<>(); filters.add(new LongTransitWalkingFilter()); filters.add(new GroupByFilter<>( "groupBy-legs-filter-on-cost", it -> new GroupByLongestLegsId(it, groupByP), new SortOnGeneralizedCost(groupByTransferCost), minLimit )); if (latestDepartureTimeLimit != null) { filters.add(new LatestDepartureTimeFilter(latestDepartureTimeLimit)); } filters.add(new OtpDefaultSortOrder(arriveBy)); if (maxLimit >= minLimit) { filters.add(new MaxLimitFilter("MAX", maxLimit, maxLimitReachedSubscriber)); } if(debug) { filters = addDebugWrappers(filters); } return new FilterChain(filters); }
Source:
<code>private List<ScmFile> getChangedFiles( File gitlog, URI relativeRepoPath ) throws IOException { GitStatusConsumer consumer = new GitStatusConsumer( new DefaultLog(), null, relativeRepoPath ); <START> try ( BufferedReader r = new BufferedReader( new FileReader( gitlog ) ) ) <END> { String line; while ( ( line = r.readLine() ) != null ) { consumer.consumeLine( line ); } } return consumer.getChangedFiles(); }</code><technical_language>create another issue is subject character conversion</technical_language>

Target:
private List<ScmFile> getChangedFiles( File gitlog, URI relativeRepoPath ) throws IOException { GitStatusConsumer consumer = new GitStatusConsumer( new DefaultLog(), null, relativeRepoPath ); try ( BufferedReader r = new BufferedReader( new InputStreamReader ( new FileInputStream( gitlog ), StandardCharsets.UTF_8 ) ) ) { String line; while ( ( line = r.readLine() ) != null ) { consumer.consumeLine( line ); } } return consumer.getChangedFiles(); }
Source:
<code>private static Order.Action buildDrugOrderAction(MedicationRequest.MedicationRequestStatus status) { if (status != null) { if (MedicationRequest.MedicationRequestStatus.STOPPED.toCode(). equalsIgnoreCase(status.toCode())) { return Order.Action.DISCONTINUE; } } <START> return Order.Action.NEW; <END> }</code><technical_language>do in line</technical_language>

Target:
private static Order.Action buildDrugOrderAction(MedicationRequest.MedicationRequestStatus status) { return (status != null && MedicationRequest.MedicationRequestStatus.STOPPED.toCode(). equalsIgnoreCase(status.toCode())) ? Order.Action.DISCONTINUE : Order.Action.NEW; }
Source:
<code>public Map<String, String> getAttributes() { <START> if (attributes == null) { <END> attributes = new HashMap<>(); } return attributes; }</code><technical_language>I assume this lazy initialization happen initialize this field in class constructors, agree</technical_language>

Target:
public Map<String, String> getAttributes() { return attributes; }
Source:
<code>public Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable { Map<Object, Object> newMap = new HashMap<>(4); for (Map.Entry<Object, Object> e : command.getMap().entrySet()) { Object key = e.getKey(); if (cdl.localNodeIsOwner(key)) { entryFactory.wrapEntryForWriting(ctx, key, EntryFactory.Wrap.WRAP_ALL, true, false); newMap.put(key, e.getValue()); } } if (newMap.size() > 0) { PutMapCommand clonedCommand = commandFactory.buildPutMapCommand(newMap, command.getMetadata(), command.getFlagsBitSet()); ctx.forkInvocationSync(clonedCommand); } <START> return ctx.continueInvocation(); <END> }</code><technical_language>continueInvocation()? I expecting shortCircuit() need process commands in node is owner. edit: this applies remaining visit* methods</technical_language>

Target:
public Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable { Map<Object, Object> newMap = new HashMap<>(4); for (Map.Entry<Object, Object> e : command.getMap().entrySet()) { Object key = e.getKey(); if (cdl.localNodeIsOwner(key)) { entryFactory.wrapEntryForWriting(ctx, key, EntryFactory.Wrap.WRAP_ALL, true, false); newMap.put(key, e.getValue()); } } if (newMap.size() > 0) { PutMapCommand clonedCommand = commandFactory.buildPutMapCommand(newMap, command.getMetadata(), command.getFlagsBitSet()); ctx.forkInvocationSync(clonedCommand); } return null; }
Source:
<code>public long writeTo(Write writeChannel) throws IOException { long sizeWritten = 0; ReadableByteChannel readableByteChannel = Channels.newChannel(streamToWrite); sizeWritten = writeChannel.appendFrom(readableByteChannel, sizeToWrite); if(sizeWritten != sizeToWrite) { throw new IOException("Not able to write fully. Expected : " + sizeToWrite + " Actual : " + sizeWritten ); } <START> return sizeWritten; <END> }</code><technical_language>is purpose of maxWriteTimeInMs now? is used</technical_language>

Target:
public long writeTo(Write writeChannel) throws IOException { ReadableByteChannel readableByteChannel = Channels.newChannel(streamToWrite); writeChannel.appendFrom(readableByteChannel, sizeToWrite); return sizeToWrite; }
Source:
<code>public void execute(CommandSender sender, String[] args) { if ( args.length == 0 ) { sender.sendMessage( ChatColor.RED + "You must supply a message." ); } else { String message = Joiner.on(' ').join( args ); try { ProxyServer.getInstance().broadcast( ComponentSerializer.parse( message ) ); } catch ( Exception e ) { if ( sender instanceof ProxiedPlayer ) { sender.sendMessage( new ComponentBuilder( "An error occurred while parsing your message. (Hover for details)" ). color( ChatColor.RED ).underlined( true ). event( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( e.getMessage() ).color( ChatColor.RED ).create() ) ). create() ); } else { <START> sender.sendMessage(ChatColor.RED + "An error occurred while parsing your message. " + e.getMessage()); <END> } } } }</code><technical_language>change this java sender.sendMessage(new ComponentBuilder( "An error occurred while parsing message: " ).color( ChatColor.RED ).append( e.getMessage() ).create() ); new system</technical_language>

Target:
public void execute(CommandSender sender, String[] args) { if ( args.length == 0 ) { sender.sendMessage( ChatColor.RED + "You must supply a message." ); } else { String message = Joiner.on(' ').join( args ); try { ProxyServer.getInstance().broadcast( ComponentSerializer.parse( message ) ); } catch ( Exception e ) { Throwable error = e; while ( error.getCause() != null ) { error = error.getCause(); } if ( sender instanceof ProxiedPlayer ) { sender.sendMessage( new ComponentBuilder( "An error occurred while parsing your message. (Hover for details)" ). color( ChatColor.RED ).underlined( true ). event( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( error.getMessage() ).color( ChatColor.RED ).create() ) ). create() ); } else { sender.sendMessage(new ComponentBuilder( "An error occurred while parsing your message: " ).color( ChatColor.RED ).append( error.getMessage() ).create() ); } } } }
Source:
<code>public void attachExistingElementWithAttributeValue_elementHasAttribute() { IdElementTemplate template = new IdElementTemplate(); <START> Assert.assertTrue(template.label.hasAttribute("someattrtibute")); Assert.assertNotNull(template.label.getAttribute("someattrtibute")); Assert.assertTrue( template.label.getAttribute("someattrtibute").isEmpty()); <END> Assert.assertFalse(template.label.hasAttribute("property-binding")); Assert.assertFalse(template.label.hasAttribute("propertyBinding")); Assert.assertFalse(template.label.hasAttribute("another-binding")); Assert.assertFalse(template.label.hasAttribute("anotherBinding")); Assert.assertFalse(template.label.hasAttribute("attribute-binding")); Assert.assertFalse(template.label.hasAttribute("attributeBinding")); Assert.assertFalse(template.label.hasAttribute("attribute-binding$")); Assert.assertFalse(template.label.hasAttribute("attributeBinding$")); Assert.assertTrue(template.label.hasAttribute("another-attribute")); Assert.assertEquals("baz", template.label.getAttribute("another-attribute")); }</code><technical_language>suggestion Assert.assertTrue(template.label.hasAttribute("someattribute")); Assert.assertNotNull(template.label.getAttribute("someattribute")); Assert.assertTrue( template.label.getAttribute("someattribute").isEmpty());</technical_language>

Target:
public void attachExistingElementWithAttributeValue_elementHasAttribute() { IdElementTemplate template = new IdElementTemplate(); Assert.assertTrue(template.label.hasAttribute("someattribute")); Assert.assertNotNull(template.label.getAttribute("someattribute")); Assert.assertTrue( template.label.getAttribute("someattribute").isEmpty()); Assert.assertFalse(template.label.hasAttribute("property-binding")); Assert.assertFalse(template.label.hasAttribute("propertyBinding")); Assert.assertFalse(template.label.hasAttribute("another-binding")); Assert.assertFalse(template.label.hasAttribute("anotherBinding")); Assert.assertFalse(template.label.hasAttribute("attribute-binding")); Assert.assertFalse(template.label.hasAttribute("attributeBinding")); Assert.assertFalse(template.label.hasAttribute("attribute-binding$")); Assert.assertFalse(template.label.hasAttribute("attributeBinding$")); Assert.assertTrue(template.label.hasAttribute("another-attribute")); Assert.assertEquals("baz", template.label.getAttribute("another-attribute")); }
Source:
<code>public long getLong(int col) { CharSequence table = getStr(0); if (table != null) { <START> TableReader reader = new TableReader(configuration, getStr(0)); <END> if (col == 3) return reader.getMinTimestamp(); else if (col == 4) return reader.getMaxTimestamp(); else if (col == 5) return reader.getVersion(); else return reader.getDataVersion(); } else { return -1; } }</code><technical_language>is a excessive create instance of table reader column get. information accessed is metadata, is a small subset of TableReader is. alternative approach read cache metadata cursor.next() column getters access that. Example of reading metadata is in TableReader class other places. Metadata is stored in a small file memory mapped reusable instance of ReadOnlyColumn if I remember correctly (I'm typing this a train)</technical_language>

Target:
public long getLong(int col) { if (metadata != null) { if (col == 1) return metadata.getMinTimestamp(); else if (col == 2) return metadata.getMaxTimestamp(); else if (col == 3) return metadata.getRowCount(); else if (col == 7) return metadata.getStructVersion(); else return metadata.getDataVersion(); } else { return -1; } }
Source:
<code>private static void recursiveFindRaoFiles(List<IResource> allRaoFiles, IPath path, IWorkspaceRoot workspaceRoot) { IContainer container = workspaceRoot.getContainerForLocation(path); try { IResource[] iResources; iResources = container.members(); <START> for (IResource iR : iResources) { <END> if ("rao".equalsIgnoreCase(iR.getFileExtension())) allRaoFiles.add(iR); if (iR.getType() == IResource.FOLDER) { IPath tempPath = iR.getLocation(); recursiveFindRaoFiles(allRaoFiles, tempPath, workspaceRoot); } } } catch (CoreException e) { e.printStackTrace(); } }</code><technical_language>iR -> iResource</technical_language>

Target:
private static void recursiveFindRaoFiles(List<IResource> allRaoFiles, IPath path, IWorkspaceRoot workspaceRoot) { IContainer container = workspaceRoot.getContainerForLocation(path); try { IResource[] iResources; iResources = container.members(); for (IResource resource : iResources) { if ("rao".equalsIgnoreCase(resource.getFileExtension())) allRaoFiles.add(resource); if (resource.getType() == IResource.FOLDER) { IPath tempPath = resource.getLocation(); recursiveFindRaoFiles(allRaoFiles, tempPath, workspaceRoot); } } } catch (CoreException e) { e.printStackTrace(); } }
Source:
<code>ClusterModel(ClusterContext clusterContext, Set<AssignableReplica> assignableReplicas, Set<AssignableNode> assignableNodes, Map<String, IdealState> baselineAssignment, Map<String, IdealState> bestPossibleAssignment) { _clusterContext = clusterContext; _assignableReplicaIndex = new HashMap<>(); assignableReplicas.stream().forEach(rep -> { Map<String, AssignableReplica> replicaMap = _assignableReplicaIndex.getOrDefault(rep.getResourceName(), new HashMap<>()); <START> replicaMap.put(rep.getReplicaKey(), rep); <END> _assignableReplicaIndex.put(rep.getReplicaKey(), replicaMap); }); _assignableNodeMap = assignableNodes.stream() .collect(Collectors.toMap(AssignableNode::getInstanceName, node -> node)); _baselineAssignment = baselineAssignment; _bestPossibleAssignment = bestPossibleAssignment; }</code><technical_language>computeIfAbsent</technical_language>

Target:
ClusterModel(ClusterContext clusterContext, Set<AssignableReplica> assignableReplicas, Set<AssignableNode> assignableNodes, Map<String, IdealState> baselineAssignment, Map<String, IdealState> bestPossibleAssignment) { _clusterContext = clusterContext; _assignableReplicaMap = assignableReplicas.stream() .collect(Collectors.groupingBy(AssignableReplica::getResourceName, Collectors.toSet())); _assignableReplicaIndex = assignableReplicas.stream().collect(Collectors .groupingBy(AssignableReplica::getResourceName, Collectors .toMap(AssignableReplica::toString, replica -> replica, (oldValue, newValue) -> oldValue))); _assignableNodeMap = assignableNodes.stream() .collect(Collectors.toMap(AssignableNode::getInstanceName, node -> node)); _baselineAssignment = baselineAssignment; _bestPossibleAssignment = bestPossibleAssignment; }
Source:
<code>private byte[] unwrapIntegrityProtectedMessage(byte[] message, int offset, int len) throws SaslException { int messageType = DigestUtils.decodeByteOrderedInteger(message, offset + len - 6, 2); int extractedSeqNum = DigestUtils.decodeByteOrderedInteger(message, offset + len - 4, 4); if (messageType != 1) { throw new SaslException("MessageType must equal to 1, but is different"); } if (extractedSeqNum != unwrapSeqNum) { throw new SaslException("Bad sequence number while unwrapping"); } byte[] extractedMessageMac = new byte[10]; byte[] extractedMessage = new byte[len - 16]; System.arraycopy(message, offset, extractedMessage, 0, len - 16); System.arraycopy(message, offset + len - 16, extractedMessageMac, 0, 10); byte[] expectedHmac = DigestUtils.computeHMAC(unwrapHmacKeyIntegrity, extractedSeqNum, hmacMD5, extractedMessage, 0, extractedMessage.length); if (Arrays2.equals(expectedHmac, 0, extractedMessageMac, 0, 10) == false) { <START> return NO_BYTES; END> } unwrapSeqNum++; return extractedMessage; }</code><technical_language>Thanks, behaviour RFC is important part there</technical_language>

Target:
private byte[] unwrapIntegrityProtectedMessage(byte[] message, int offset, int len) throws SaslException { int messageType = decodeByteOrderedInteger(message, offset + len - 6, 2); int extractedSeqNum = decodeByteOrderedInteger(message, offset + len - 4, 4); if (messageType != 1) { throw new SaslException("MessageType must equal to 1, but is different"); } if (extractedSeqNum != unwrapSeqNum) { throw new SaslException("Bad sequence number while unwrapping"); } byte[] extractedMessageMac = new byte[10]; byte[] extractedMessage = new byte[len - 16]; System.arraycopy(message, offset, extractedMessage, 0, len - 16); System.arraycopy(message, offset + len - 16, extractedMessageMac, 0, 10); byte[] expectedHmac = computeHMAC(unwrapHmacKeyIntegrity, extractedSeqNum, hmacMD5, extractedMessage, 0, extractedMessage.length); if (Arrays2.equals(expectedHmac, 0, extractedMessageMac, 0, 10) == false) { return NO_BYTES; } unwrapSeqNum++; return extractedMessage; }
Source:
<code>private List<Encounter> getAllEncountersByPatientMotechId(String motechId) { <START> Validate.notEmpty(motechId, "MoTeCH Id cannot be empty"); <END> List<Encounter> encounters = new ArrayList<>(); Patient patient = patientAdapter.getPatientByMotechId(motechId); if (patient != null) { encounters.addAll(getEncountersForPatient(patient)); } return encounters; }</code><technical_language>bad capitalization of MOTECH</technical_language>

Target:
private List<Encounter> getAllEncountersByPatientMotechId(String motechId) { Validate.notEmpty(motechId, "MOTECH Id cannot be empty"); List<Encounter> encounters = new ArrayList<>(); Patient patient = patientAdapter.getPatientByMotechId(motechId); if (patient != null) { encounters.addAll(getEncountersForPatient(patient)); } return encounters; }
Source:
<code>public List<CompletionTime> getTraceCompletionTimes(String tenantId, Criteria criteria) { String index = client.getIndex(tenantId); try { RefreshRequestBuilder refreshRequestBuilder = client.getClient().admin().indices().prepareRefresh(index); client.getClient().admin().indices().refresh(refreshRequestBuilder.request()).actionGet(); BoolQueryBuilder query = ElasticsearchUtil.buildQuery(criteria, "timestamp", "businessTransaction"); SearchRequestBuilder request = client.getClient().prepareSearch(index) .setTypes(TRACE_COMPLETION_TIME_TYPE) .setSearchType(SearchType.DFS_QUERY_THEN_FETCH) .setTimeout(TimeValue.timeValueMillis(criteria.getTimeout())) .setSize(criteria.getMaxResponseSize()) .setQuery(query); SearchResponse response = request.execute().actionGet(); if (response.isTimedOut()) { msgLog.warnQueryTimedOut(); return null; } List<CompletionTime> ret = new ArrayList<CompletionTime>(); for (SearchHit searchHitFields : response.getHits()) { try { ret.add(mapper.readValue(searchHitFields.getSourceAsString(), CompletionTime.class)); <START> } catch (Exception e) { <END> msgLog.errorFailedToParse(e); } } return ret; } catch (org.elasticsearch.indices.IndexMissingException t) { if (msgLog.isTraceEnabled()) { msgLog.tracef("No index found, so unable to get completion count"); } } return null; }</code><technical_language>catch more concrete exception (JsonParseException)</technical_language>

Target:
public List<CompletionTime> getTraceCompletionTimes(String tenantId, Criteria criteria) { String index = client.getIndex(tenantId); try { RefreshRequestBuilder refreshRequestBuilder = client.getClient().admin().indices().prepareRefresh(index); client.getClient().admin().indices().refresh(refreshRequestBuilder.request()).actionGet(); BoolQueryBuilder query = ElasticsearchUtil.buildQuery(criteria, "timestamp", "businessTransaction"); SearchRequestBuilder request = client.getClient().prepareSearch(index) .setTypes(TRACE_COMPLETION_TIME_TYPE) .setSearchType(SearchType.DFS_QUERY_THEN_FETCH) .setTimeout(TimeValue.timeValueMillis(criteria.getTimeout())) .setSize(criteria.getMaxResponseSize()) .setQuery(query); SearchResponse response = request.execute().actionGet(); if (response.isTimedOut()) { msgLog.warnQueryTimedOut(); return null; } List<CompletionTime> ret = new ArrayList<CompletionTime>(); for (SearchHit searchHitFields : response.getHits()) { try { ret.add(mapper.readValue(searchHitFields.getSourceAsString(), CompletionTime.class)); } catch (JsonParseException|JsonMappingException e) { msgLog.errorFailedToParse(e); } catch (IOException e) { msgLog.errorFailedToParse(e); } } return ret; } catch (org.elasticsearch.indices.IndexMissingException t) { if (msgLog.isTraceEnabled()) { msgLog.tracef("No index found, so unable to get completion count"); } } return null; }
Source:
<code>protected void connectUfs(UnderFileSystem fs) throws IOException { <START> fs.connectFromMaster( <END> NetworkAddressUtils.getConnectHost(NetworkAddressUtils.ServiceType.MASTER_RPC, ServerConfiguration.global())); }</code><technical_language>NOOP require this implementation</technical_language>

Target:
protected void connectUfs(UnderFileSystem fs) { }
Source:
<code>private double getScaleFactor() { <START> return 72.0 / this.dpi; <END> }</code><technical_language>72 is a constant in Constants class</technical_language>

Target:
private double getScaleFactor() { return Constants.PDF_DPI / this.dpi; }
Source:
<code>public void activateFilterIdsAndUpdateViewer(String[] filterIdsToActivate) { boolean updateFilterActivation = false; Arrays.sort(filterIdsToActivate); CommonFilterDescriptor[] visibleFilterDescriptors = (CommonFilterDescriptor[]) getVisibleFilterDescriptors(); int indexofFilterIdToBeActivated; List<String> nonUiVisible = null; for (int i = 0; i < visibleFilterDescriptors.length; i++) { indexofFilterIdToBeActivated = Arrays.binarySearch(filterIdsToActivate, visibleFilterDescriptors[i].getId()); if (indexofFilterIdToBeActivated >= 0 ^ isActive(visibleFilterDescriptors[i].getId())) { updateFilterActivation = true; } if (!visibleFilterDescriptors[i].isVisibleInUi()) { if (nonUiVisible == null) nonUiVisible = new ArrayList<String>(); nonUiVisible.add(visibleFilterDescriptors[i].getId()); } } if (updateFilterActivation) { if (nonUiVisible != null) { for (String <START> element : <END> filterIdsToActivate) nonUiVisible.add(element); filterIdsToActivate = nonUiVisible.toArray(new String[]{}); } setActiveFilterIds(filterIdsToActivate); persistFilterActivationState(); updateViewer(); StructuredViewer commonViewer = (StructuredViewer) contentService.getViewer(); commonViewer.setSelection(StructuredSelection.EMPTY); } }</code><technical_language>rename 'filterIdToActivate'</technical_language>

Target:
public void activateFilterIdsAndUpdateViewer(String[] filterIdsToActivate) { boolean updateFilterActivation = false; Arrays.sort(filterIdsToActivate); CommonFilterDescriptor[] visibleFilterDescriptors = (CommonFilterDescriptor[]) getVisibleFilterDescriptors(); int indexofFilterIdToBeActivated; List<String> nonUiVisible = null; for (int i = 0; i < visibleFilterDescriptors.length; i++) { indexofFilterIdToBeActivated = Arrays.binarySearch(filterIdsToActivate, visibleFilterDescriptors[i].getId()); if (indexofFilterIdToBeActivated >= 0 ^ isActive(visibleFilterDescriptors[i].getId())) { updateFilterActivation = true; } if (!visibleFilterDescriptors[i].isVisibleInUi()) { if (nonUiVisible == null) nonUiVisible = new ArrayList<String>(); nonUiVisible.add(visibleFilterDescriptors[i].getId()); } } if (updateFilterActivation) { if (nonUiVisible != null) { for (String filterIdToActivate : filterIdsToActivate) nonUiVisible.add(filterIdToActivate); filterIdsToActivate = nonUiVisible.toArray(new String[]{}); } setActiveFilterIds(filterIdsToActivate); persistFilterActivationState(); updateViewer(); StructuredViewer commonViewer = (StructuredViewer) contentService.getViewer(); commonViewer.setSelection(StructuredSelection.EMPTY); } }
Source:
<code>public long getFirstRowIndex() { if (firstRowIndex < 0) { <START> throw new NotInPageFilteringModeException("First row index is not available"); <END> } return firstRowIndex; }</code><technical_language>this throw exception for filtering mode? reader mode matter this. a starting index row count doesn't. I a API avoid throwing exception Optional, Long/null, -1 signal page report this. Throwing exception a runtime error expectation met, while returning Option forces callers handle case option is empty</technical_language>

Target:
public Optional<Long> getFirstRowIndex() { return firstRowIndex < 0 ? Optional.empty() : Optional.of(firstRowIndex); }
Source:
<code><START> public void merge(SummaryCollection other, SummarizerFactory factory) { <END> for (Entry<SummarizerConfiguration,MergedSummary> entry : other.mergedSummaries.entrySet()) { MergedSummary ms = mergedSummaries.get(entry.getKey()); if (ms == null) { mergedSummaries.put(entry.getKey(), entry.getValue()); } else { ms.merge(entry.getValue(), entry.getKey(), factory); } } this.totalFiles += other.totalFiles; }</code><technical_language>Do need doc this is not-thread-safe? I guess internal</technical_language>

Target:
public void merge(SummaryCollection other, SummarizerFactory factory) { for (Entry<SummarizerConfiguration,MergedSummary> entry : other.mergedSummaries.entrySet()) { MergedSummary ms = mergedSummaries.get(entry.getKey()); if (ms == null) { mergedSummaries.put(entry.getKey(), entry.getValue()); } else { ms.merge(entry.getValue(), entry.getKey(), factory); } } this.totalFiles += other.totalFiles; this.deletedFiles += other.deletedFiles; }
Source:
<code>public void spec317_mustSignalOnErrorWhenPendingAboveLongMaxValue() throws Throwable { final long MAX_SPINS = 10; final long SPIN_ASSERT_DELAY = env.defaultTimeoutMillis() / MAX_SPINS; activePublisherTest(Integer.MAX_VALUE, new PublisherTestRun<T>() { @Override public void run(Publisher<T> pub) throws Throwable { final ManualSubscriber<T> sub = env.newBlackholeSubscriber(pub); sub.request(Long.MAX_VALUE - 1); long i = 0; boolean overflowSignalled = false; while (!overflowSignalled && i < MAX_SPINS) { sub.request(Long.MAX_VALUE - 1); try { Thread.sleep(SPIN_ASSERT_DELAY); env.assertAsyncErrorWithMessage(IllegalStateException.class, "3.17"); overflowSignalled = true; <START> } catch (Throwable thr) { <END> } i++; } env.debug(String.format("Signalled overflow after %d-th spin (of max: %d), with %dms delays: %s (`true` is expected)", i + 1, MAX_SPINS, SPIN_ASSERT_DELAY, overflowSignalled)); assertTrue(overflowSignalled, String.format("Expected overflow to be signalled after %d spins (max: %d), with delays: %d", i + 1, MAX_SPINS, SPIN_ASSERT_DELAY)); env.verifyNoAsyncErrors(env.defaultTimeoutMillis()); } }); }</code><technical_language>I this part. If swallow exceptions need more specific</technical_language>

Target:
public void spec317_mustSignalOnErrorWhenPendingAboveLongMaxValue() throws Throwable { final long MAX_SPINS = 10; final long SPIN_ASSERT_DELAY = env.defaultTimeoutMillis() / MAX_SPINS; activePublisherTest(Integer.MAX_VALUE, new PublisherTestRun<T>() { @Override public void run(Publisher<T> pub) throws Throwable { final ManualSubscriber<T> sub = env.newBlackholeSubscriber(pub); sub.request(Long.MAX_VALUE - 1); long i = 0; boolean overflowSignalled = false; while (!overflowSignalled && i < MAX_SPINS) { sub.request(Long.MAX_VALUE - 1); Thread.sleep(SPIN_ASSERT_DELAY); Throwable asyncError = env.dropAsyncError(); if (asyncError == null) { } else { env.assertAsyncErrorWithMessage(asyncError, IllegalStateException.class, "3.17"); overflowSignalled = true; } i++; } env.debug(String.format("Signalled overflow after %d-th spin (of max: %d), with %dms delays: %s (`true` is expected)", i + 1, MAX_SPINS, SPIN_ASSERT_DELAY, overflowSignalled)); assertTrue(overflowSignalled, String.format("Expected overflow to be signalled after %d spins (max: %d), with delays: %d", i + 1, MAX_SPINS, SPIN_ASSERT_DELAY)); env.verifyNoAsyncErrors(env.defaultTimeoutMillis()); } }); }
Source:
<code>public ZookeeperConfigRefreshListener zookeeperConfigRefreshListener( RefreshEndpoint refreshEndpoint) { <START> return new ZookeeperConfigRefreshListener("application", refreshEndpoint); <END> }</code><technical_language>application is fixed? value? ZookeeperConfigProperties.defaultContext</technical_language>

Target:
public ZookeeperConfigRefreshListener zookeeperConfigRefreshListener( RefreshEndpoint refreshEndpoint) { return new ZookeeperConfigRefreshListener(refreshEndpoint); }
Source:
<code>public static IndexSchemaManagementStrategy interpretPropertyValue(String propertyValue) { <START> IndexSchemaManagementStrategy strategy = VALUES_BY_EXTERNAL_NAME.get( propertyValue ); <END> if ( strategy == null ) { throw new IllegalArgumentException( "Unrecognized property value for an index schema management strategy: '" + propertyValue + "'. Please use one of " + VALUES_BY_EXTERNAL_NAME.keySet() ); } return strategy; }</code><technical_language>Traditionally more forgiving case preferences trailing whitespaces. change this strategy a map attempt a ignore-case equals enum name, trim propertyValue in advance well</technical_language>

Target:
public static IndexSchemaManagementStrategy interpretPropertyValue(String propertyValue) { final String normalizedName = propertyValue.trim().toLowerCase( Locale.ROOT ); IndexSchemaManagementStrategy strategy = VALUES_BY_EXTERNAL_NAME.get( normalizedName ); if ( strategy == null ) { throw new IllegalArgumentException( "Unrecognized property value for an index schema management strategy: '" + propertyValue + "'. Please use one of " + VALUES_BY_EXTERNAL_NAME.keySet() ); } return strategy; }
Source:
<code>private void displayRandomization() { if ( isRandomized() ) { final Randomizer randomizer = reportConfiguration.getRunOrderParameters().getRandomizer(); final String pluginName = reportConfiguration.getPluginName(); <START> log( "" ); <END> log( String.format( "Tests are randomly ordered. Re-run the same execution order" + " with -D%s.runOrder=random:%d", pluginName, randomizer.getSeed() ) ); log( "" ); } }</code><technical_language>pls remove this line</technical_language>

Target:
private void displayRandomization() { if ( isRandomized() ) { final Randomizer randomizer = reportConfiguration.getRunOrderParameters().getRandomizer(); final String pluginName = reportConfiguration.getPluginName(); final String message = String.format( "Tests are randomly ordered. Re-run the same execution order" + " with -D%s.runOrder=random:%d", pluginName, randomizer.getSeed() ); log( "" ); log( message ); log( "" ); } }
Source:
<code>public int shutdownAndGetConnectionCount() throws IOException, InterruptedException { try { serverSocket.close(); <START> shutdownLatch.await(); <END> } finally { serverThread.join(); return connectionAttempts.get(); } }</code><technical_language>want put a timeout this fail if triggers</technical_language>

Target:
public int shutdownAndGetConnectionCount() throws IOException, InterruptedException { try { serverSocket.close(); shutdownLatch.await(1, TimeUnit.SECONDS); serverThread.join(200); assertFalse("serverThread failed to shut down quickly", serverThread.isAlive()); } finally { return connectionAttempts.get(); } }
Source:
<code>public static byte[] generateApkSigningBlock( DataSource beforeCentralDir, DataSource centralDir, DataSource eocd, List<SignerConfig> signerConfigs) throws IOException, InvalidKeyException, SignatureException { if (signerConfigs.isEmpty()) { throw new IllegalArgumentException( "No signer configs provided. At least one is required"); } Set<ContentDigestAlgorithm> contentDigestAlgorithms = new HashSet<>(1); for (SignerConfig signerConfig : signerConfigs) { for (SignatureAlgorithm signatureAlgorithm : signerConfig.signatureAlgorithms) { contentDigestAlgorithms.add(signatureAlgorithm.getContentDigestAlgorithm()); } } long centralDirOffsetForDigesting = beforeCentralDir.size(); ByteBuffer eocdBuf = copyToByteBuffer(eocd); eocdBuf.order(ByteOrder.LITTLE_ENDIAN); ZipUtils.setZipEocdCentralDirectoryOffset(eocdBuf, centralDirOffsetForDigesting); Map<ContentDigestAlgorithm, byte[]> contentDigests; try { contentDigests = computeContentDigests( contentDigestAlgorithms, new DataSource[] { beforeCentralDir, centralDir, DataSources.asDataSource(eocdBuf)}); } catch (IOException e) { <START> throw new IOException("Failed to read APK being signed"); <END> } catch (DigestException e) { throw new SignatureException("Failed to compute digests of APK", e); } return generateApkSigningBlock(signerConfigs, contentDigests); }</code><technical_language>reason include e</technical_language>

Target:
public static byte[] generateApkSigningBlock( DataSource beforeCentralDir, DataSource centralDir, DataSource eocd, List<SignerConfig> signerConfigs) throws IOException, InvalidKeyException, SignatureException { if (signerConfigs.isEmpty()) { throw new IllegalArgumentException( "No signer configs provided. At least one is required"); } Set<ContentDigestAlgorithm> contentDigestAlgorithms = new HashSet<>(1); for (SignerConfig signerConfig : signerConfigs) { for (SignatureAlgorithm signatureAlgorithm : signerConfig.signatureAlgorithms) { contentDigestAlgorithms.add(signatureAlgorithm.getContentDigestAlgorithm()); } } long centralDirOffsetForDigesting = beforeCentralDir.size(); ByteBuffer eocdBuf = copyToByteBuffer(eocd); eocdBuf.order(ByteOrder.LITTLE_ENDIAN); ZipUtils.setZipEocdCentralDirectoryOffset(eocdBuf, centralDirOffsetForDigesting); Map<ContentDigestAlgorithm, byte[]> contentDigests; try { contentDigests = computeContentDigests( contentDigestAlgorithms, new DataSource[] { beforeCentralDir, centralDir, DataSources.asDataSource(eocdBuf)}); } catch (IOException e) { throw new IOException("Failed to read APK being signed", e); } catch (DigestException e) { throw new SignatureException("Failed to compute digests of APK", e); } return generateApkSigningBlock(signerConfigs, contentDigests); }
Source:
<code>public void show(Map<String, Status> changedFiles, String revision, Project project) { this.changedFiles = changedFiles; this.project = project; view.showDialog(); <START> view.setEnableCompareButton(false); <END> viewChangedFiles(); view.setEnableExpandCollapseButtons(treeViewEnabled); this.revision = revision; }</code><technical_language>mb init state of view show dialog</technical_language>

Target:
public void show(Map<String, Status> changedFiles, String revision, Project project) { this.changedFiles = changedFiles; this.project = project; this.revision = revision; view.setEnableCompareButton(false); view.setEnableExpandCollapseButtons(treeViewEnabled); view.showDialog(); viewChangedFiles(); }
Source:
<code>public Note get(String noteId, AuthenticationInfo subject) throws IOException { BlobId blobId = makeBlobId(noteId); byte[] contents; try { contents = storage.readAllBytes(blobId); } catch (StorageException se) { throw new IOException("Could not read " + blobId.toString() + ": " + se.getMessage(), se); } Note note; try { note = Note.fromJson(new String(contents, encoding)); } catch (JsonParseException jpe) { throw new IOException( "Could note parse as json " + blobId.toString() + jpe.getMessage(), jpe); } for (Paragraph p : note.getParagraphs()) { <START> if (p.getStatus() == Status.PENDING || p.getStatus() == Status.RUNNING) { <END> p.setStatus(Status.ABORT); } List<ApplicationState> appStates = p.getAllApplicationStates(); if (appStates != null) { for (ApplicationState app : appStates) { if (app.getStatus() != ApplicationState.Status.ERROR) { app.setStatus(ApplicationState.Status.UNLOADED); } } } } return note; }</code><technical_language>If this post-processing is common notebook repo implementation, here</technical_language>

Target:
public Note get(String noteId, AuthenticationInfo subject) throws IOException { BlobId blobId = makeBlobId(noteId); byte[] contents; try { contents = storage.readAllBytes(blobId); } catch (StorageException se) { throw new IOException("Could not read " + blobId.toString() + ": " + se.getMessage(), se); } try { return Note.fromJson(new String(contents, encoding)); } catch (JsonParseException jpe) { throw new IOException( "Could note parse as json " + blobId.toString() + jpe.getMessage(), jpe); } }
Source:
<code>public void ensureUserIsTryingToFollowPeergos() { String username = generateUsername(); String password = "password"; UserContext userContext = PeergosNetworkUtils.ensureSignedUp(username, password, network, crypto); Boolean requestToFollowPeergos = userContext.getSocialState().join().pendingOutgoingFollowRequests.containsKey("peergos"); assertTrue("Pending follow request Peergos exists after sign-up", requestToFollowPeergos); userContext.unfollow("peergos"); <START> requestToFollowPeergos = userContext.getFollowing().join().contains("peergos"); <END> assertTrue("Unfollowed Peergos", !requestToFollowPeergos); userContext.logout(); UserContext renewedUserContext = UserContext.signIn(username, password, network, crypto).join(); renewedUserContext.ensureFollowingPeergos(); requestToFollowPeergos = renewedUserContext.getSocialState().join().pendingOutgoingFollowRequests.containsKey("peergos"); assertTrue("Peergos user is being followed again", requestToFollowPeergos); }</code><technical_language>This true interaction peergos user</technical_language>

Target:
public void ensureUserIsTryingToFollowPeergos() { String username = generateUsername(); String password = "password"; UserContext userContext = PeergosNetworkUtils.ensureSignedUp(username, password, network, crypto); Boolean requestToFollowPeergos = userContext.getSocialState().join().pendingOutgoingFollowRequests.containsKey("peergos"); assertTrue("Pending follow request Peergos exists after sign-up", requestToFollowPeergos); UserContext peergosUser = UserContext.signIn("peergos", "testpassword", network, crypto).join(); List<FollowRequestWithCipherText> followRequests = peergosUser.processFollowRequests().join(); for (FollowRequestWithCipherText request : followRequests) { boolean accept = true; boolean reciprocate = true; peergosUser.sendReplyFollowRequest(request, accept, reciprocate).join(); } userContext = UserContext.signIn(username, password, network, crypto).join(); userContext.processFollowRequests().join(); userContext.unfollow("peergos"); Boolean followingPeergos = userContext.getFollowing().join().contains("peergos"); assertTrue("Unfollowed Peergos", !followingPeergos); userContext.logout(); UserContext renewedUserContext = UserContext.signIn(username, password, network, crypto).join(); renewedUserContext.ensureFollowingPeergos().join(); requestToFollowPeergos = renewedUserContext.getSocialState().join().pendingOutgoingFollowRequests.containsKey("peergos"); assertTrue("Pending request to follow Peergos is back", requestToFollowPeergos); }
Source:
<code>void performFinish(IProgressMonitor monitor) { final IMarkerResolution resolution = getSelectedResolution(); if (resolution == null) return; final Object[] checked = markersTable.getCheckedElements(); if (checked.length == 0) return; if (resolution instanceof WorkbenchMarkerResolution) { try { getWizard().getContainer().run(false, true, monitor1 -> { IMarker[] markers = new IMarker[checked.length]; System.arraycopy(checked, 0, markers, 0, checked.length); ((WorkbenchMarkerResolution) resolution).run(markers, monitor1); }); } catch (InvocationTargetException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } catch (InterruptedException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } } else { try { getWizard().getContainer().run(false, true, monitor1 -> { monitor1.beginTask(MarkerMessages.MarkerResolutionDialog_Fixing, checked.length); for (Object <START> element : <END> checked) { getShell().getDisplay().readAndDispatch(); if (monitor1.isCanceled()) { return; } IMarker marker = (IMarker) element; monitor1.subTask(Util.getProperty(IMarker.MESSAGE, marker)); resolution.run(marker); monitor1.worked(1); } }); } catch (InvocationTargetException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } catch (InterruptedException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } } }</code><technical_language>rename 'checkedElement'</technical_language>

Target:
void performFinish(IProgressMonitor monitor) { final IMarkerResolution resolution = getSelectedResolution(); if (resolution == null) return; final Object[] checked = markersTable.getCheckedElements(); if (checked.length == 0) return; if (resolution instanceof WorkbenchMarkerResolution) { try { getWizard().getContainer().run(false, true, monitor1 -> { IMarker[] markers = new IMarker[checked.length]; System.arraycopy(checked, 0, markers, 0, checked.length); ((WorkbenchMarkerResolution) resolution).run(markers, monitor1); }); } catch (InvocationTargetException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } catch (InterruptedException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } } else { try { getWizard().getContainer().run(false, true, monitor1 -> { monitor1.beginTask(MarkerMessages.MarkerResolutionDialog_Fixing, checked.length); for (Object checkedElement : checked) { getShell().getDisplay().readAndDispatch(); if (monitor1.isCanceled()) { return; } IMarker marker = (IMarker) checkedElement; monitor1.subTask(Util.getProperty(IMarker.MESSAGE, marker)); resolution.run(marker); monitor1.worked(1); } }); } catch (InvocationTargetException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } catch (InterruptedException e) { StatusManager.getManager().handle( MarkerSupportInternalUtilities.errorFor(e)); } } }
Source:
<code>public Image getImage(final String id) { Optional<Image> firstInterestingImage = Iterables.tryFind(listImages(), new Predicate<Image>() { public boolean apply(Image input) { return input.id().equals(id); } }); if (!firstInterestingImage.isPresent()) { <START> throw new IllegalStateException("Cannot find image with the required slug " + id); <END> } return firstInterestingImage.get(); }</code><technical_language>fail return null</technical_language>

Target:
public ImageInRegion getImage(final String id) { RegionAndId regionAndId = fromSlashEncoded(id); Image image = api.imageApi().list(regionAndId.regionId(), ListImagesOptions.Builder.imageIds(regionAndId.id())) .firstMatch(Predicates.<Image>notNull()) .orNull(); if (image == null) return null; return ImageInRegion.create(regionAndId.regionId(), image); }
Source:
<code>public void cacheManagerCanReconnect() throws Exception { URI connectionURI = CLUSTER.getConnectionURI(); try (PersistentCacheManager cacheManager = newCacheManagerBuilder() .with(cluster(connectionURI.resolve("/crud-cm")) .autoCreateOnReconnect(server -> server.defaultServerResource("primary-server-resource"))) .build(true)) { Cache<Long, String> cache = cacheManager.createCache("clustered-cache", newCacheConfigurationBuilder(Long.class, String.class, newResourcePoolsBuilder() .with(clusteredDedicated("primary-server-resource", 1, MemoryUnit.MB))) .build()); cache.put(1L, "one"); CLUSTER.getClusterControl().terminateAllServers(); CLUSTER.getClusterControl().startAllServers(); <START> long end = System.nanoTime() + TimeUnit.SECONDS.toNanos(20); <END> while (cache.get(1L) == null) { Thread.sleep(100); cache.put(1L, "two"); } assertThat(cache.get(1L), is("two")); } }</code><technical_language>unused variable</technical_language>

Target:
public void cacheManagerCanReconnect() throws Exception { URI connectionURI = CLUSTER.getConnectionURI(); try (PersistentCacheManager cacheManager = newCacheManagerBuilder() .with(cluster(connectionURI.resolve("/crud-cm")) .autoCreateOnReconnect(server -> server.defaultServerResource("primary-server-resource"))) .build(true)) { Cache<Long, String> cache = cacheManager.createCache("clustered-cache", newCacheConfigurationBuilder(Long.class, String.class, newResourcePoolsBuilder() .with(clusteredDedicated("primary-server-resource", 1, MemoryUnit.MB))) .build()); cache.put(1L, "one"); CLUSTER.getClusterControl().terminateAllServers(); CLUSTER.getClusterControl().startAllServers(); while (cache.get(1L) == null) { Thread.sleep(100); cache.put(1L, "two"); } assertThat(cache.get(1L), is("two")); } }
Source:
<code>public void MobileLogin_004_failedLoginEmptyPassword_MOB_760() { MobileBasePageObject mobile = new MobileBasePageObject(driver); mobile.openHome(wikiURL); mobile.openRandomPage(); <START> System.out.println(credentials.userName12); <END> MobileSpecialUserLogin login = mobile.loginFailedDropDown(credentials.userName12, ""); login.verifyEmptyPasswordErrorMessage(); }</code><technical_language>remove this line</technical_language>

Target:
public void MobileLogin_004_failedLoginEmptyPassword_MOB_760() { MobileBasePageObject mobile = new MobileBasePageObject(driver); mobile.openHome(wikiURL); mobile.openRandomPage(); MobileSpecialUserLogin login = mobile.loginFailedDropDown(credentials.userName12, ""); login.verifyEmptyPasswordErrorMessage(); }
Source:
<code>private static String parseBucketPath(final String testPath) { <START> return testPath.substring(0, testPath.lastIndexOf(bucketObjectsSubstring)); <END> }</code><technical_language>indent is long</technical_language>

Target:
private static String parseBucketPath(final String testPath) { final int endIndex = testPath.lastIndexOf(bucketObjectsSubstring); return testPath.substring(0, endIndex); }