auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void repetitiveRecoveryIfCorruptedLogsWithCheckpoints() throws IOException { GraphDatabaseAPI database = (GraphDatabaseAPI) databaseFactory.newEmbeddedDatabase( storeDir ); generateTransactionsAndRotate( database, 4, true ); database.shutdown(); while ( logFiles.getHighestLogVersion() > 0 ) { int bytesToTrim = 1 + random.nextInt( 100 ); <START> System.out.println("Trim: " + bytesToTrim); <END> truncateBytesFromLastLogFile( bytesToTrim ); databaseFactory.newEmbeddedDatabase( storeDir ).shutdown(); int numberOfRecoveredTransactions = recoveryMonitor.getNumberOfRecoveredTransactions(); assertThat( numberOfRecoveredTransactions, Matchers.greaterThanOrEqualTo( 0 ) ); } File corruptedLogArchives = new File( storeDir, CorruptedLogsTruncator.CORRUPTED_TX_LOGS_BASE_NAME ); assertThat( corruptedLogArchives.listFiles(), not( emptyArray() ) ); }</code><technical_language>Is this sysout purpose? If yes, add a rule suppress output</technical_language>

Target:
public void repetitiveRecoveryIfCorruptedLogsWithCheckpoints() throws IOException { GraphDatabaseAPI database = (GraphDatabaseAPI) databaseFactory.newEmbeddedDatabase( storeDir ); generateTransactionsAndRotate( database, 4, true ); database.shutdown(); while ( logFiles.getHighestLogVersion() > 0 ) { int bytesToTrim = 1 + random.nextInt( 100 ); truncateBytesFromLastLogFile( bytesToTrim ); databaseFactory.newEmbeddedDatabase( storeDir ).shutdown(); int numberOfRecoveredTransactions = recoveryMonitor.getNumberOfRecoveredTransactions(); assertThat( numberOfRecoveredTransactions, Matchers.greaterThanOrEqualTo( 0 ) ); } File corruptedLogArchives = new File( storeDir, CorruptedLogsTruncator.CORRUPTED_TX_LOGS_BASE_NAME ); assertThat( corruptedLogArchives.listFiles(), not( emptyArray() ) ); }
Source:
<code>protected abstract void processIncoming() throws IOException, ClientConnectionException; private void processHeartbeat() { if (!this.isInInit() && this.policy.isIncomingHeartbeat() && this.isIncomingHeartbeatExeeded()) { log.info("Heartbeat exceeded for " + getHostname() + " last response was " + getHeartbeatTime() <START> + " milliseconds ago."); <END> this.disconnect("Heartbeat exceeded"); } }</code><technical_language>slf4j format standard? log.info("Heartbeat exceeded for host '{}', response arrived ms ago.", getHostname(), getHeartbeatTime();</technical_language>

Target:
protected abstract void processIncoming() throws IOException, ClientConnectionException; private void processHeartbeat() { if (!this.isInInit() && this.policy.isIncomingHeartbeat() && this.isIncomingHeartbeatExeeded()) { log.error("Heartbeat exceeded for host '{}', last response arrived ms ago.", getHostname(), getHeartbeatTime()); this.disconnect("Heartbeat exceeded"); } }
Source:
<code>public void shouldConvertToReviewInput() { Review review = new Review(ImmutableList.of(new ReviewFile("test"))); ReviewInput reviewInput = review.toReviewInput(); assertThat(reviewInput.comments).hasSize(1); assertThat(reviewInput.comments).containsKey("test"); <START> assertThat(reviewInput.comments).containsValue(Collections.<ReviewFileComment>emptyList()); <END> }</code><technical_language>assertThat#containsEntry map</technical_language>

Target:
public void shouldConvertToReviewInput() { Review review = new Review(ImmutableList.of(new ReviewFile("test"))); ReviewInput reviewInput = review.toReviewInput(); assertThat(reviewInput.comments) .hasSize(1) .containsEntry("test", Collections.<ReviewFileComment>emptyList()); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } UsernamePasswordIdentityConfig other = (UsernamePasswordIdentityConfig) obj; <START> if (password == null) { if (other.password != null) { return false; } } else if (!password.equals(other.password)) { return false; } if (username == null) { if (other.username != null) { return false; } } else if (!username.equals(other.username)) { return false; } <END> return true; }</code><technical_language>Objects.equals()</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } UsernamePasswordIdentityConfig other = (UsernamePasswordIdentityConfig) obj; return Objects.equals(password, other.password) && Objects.equals(username, other.username); }
Source:
<code>public synchronized void put(final JobRequest request) { mCacheId.put(request.getJobId(), request); if (!TextUtils.isEmpty(request.getTag())) { mCacheTag.put(request.getTag(), request); } <START> mExecutorService.execute(new Runnable() { <END> @Override public void run() { store(request); } }); }</code><technical_language>moving commit apply, is a file write calling thread, call is guaranteed persisted call completes. change API expectations</technical_language>

Target:
public synchronized void put(final JobRequest request) { mCacheId.put(request.getJobId(), request); if (!TextUtils.isEmpty(request.getTag())) { mCacheTag.put(request.getTag(), request); } store(request); }
Source:
<code>private DirContext authenticate(String username, String password) throws AccountException, NamingException { final Properties env = createContextProperties(); <START> if (username != null) { <END> env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, username); env.put(Context.SECURITY_CREDENTIALS, password != null ? password : ""); } return new InitialDirContext(env); }</code><technical_language>username null here? If is null, opening anonymous connection? fail? A null username implies user submitted login dialog a username entered. a valid username authenticate with. reject outright talking LDAP directory server</technical_language>

Target:
private DirContext authenticate(String username, String password) throws AccountException { final Properties env = createContextProperties(); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, username); env.put(Context.SECURITY_CREDENTIALS, password != null ? password : ""); DirContext ctx; try { ctx = new InitialDirContext(env); } catch (NamingException e) { throw new AccountException("Incorrect username or password", e); } return ctx; }
Source:
<code>private StandardEvaluationContext createMethodInvocationEvaluationContext(Object[] arguments) { StandardEvaluationContext context = ExpressionUtils.createStandardEvaluationContext(this.beanFactory); context.setVariable("args", arguments); context.setVariable("method", this.method.getName()); context.setVariable("methodName", this.method.getName()); context.setVariable("methodString", this.method.toString()); <START> context.setVariable("methodObject", this.method); <END> return context; }</code><technical_language>is reason variables Method. enough one. others extracted SpEL: expression="#method.name" expression="#method.toString()"</technical_language>

Target:
private StandardEvaluationContext createMethodInvocationEvaluationContext(Object[] arguments) { StandardEvaluationContext context = ExpressionUtils.createStandardEvaluationContext(this.beanFactory); context.setVariable("args", arguments); context.setVariable("method", this.method.getName()); context.setVariable("gatewayMethod", this.method); return context; }
Source:
<code>public void deleteEntityLockedState(String entityName, String entityType, String operation) throws WorkflowException { Connection connection = null; PreparedStatement prepStmt = null; try { connection = JDBCPersistenceManager.getInstance().getDBConnection(); prepStmt = connection.prepareStatement(SQLConstants.DELETE_ENTITY_STATE_QUERY); prepStmt.setString(1, entityName); prepStmt.setString(2, entityType); prepStmt.setString(3, "Operation"); prepStmt.setString(4, operation); prepStmt.execute(); connection.commit(); } catch (SQLException | IdentityException e) { log.error("Error while saving new user data for Identity database.", e); <START> throw new WorkflowException("Error while deleting temporary user record from Identity database.", e); <END> } finally { IdentityDatabaseUtil.closeStatement(prepStmt); IdentityDatabaseUtil.closeConnection(connection); } }</code><technical_language>log throw exception</technical_language>

Target:
public void deleteEntityLockedState(String entityName, String entityType, String operation) throws WorkflowException { Connection connection = null; PreparedStatement prepStmt = null; try { connection = IdentityDatabaseUtil.getDBConnection();; prepStmt = connection.prepareStatement(SQLConstants.DELETE_ENTITY_STATE_QUERY); prepStmt.setString(1, entityName); prepStmt.setString(2, entityType); prepStmt.setString(3, "Operation"); prepStmt.setString(4, operation); prepStmt.execute(); connection.commit(); } catch (SQLException | IdentityException e) { throw new WorkflowException("Error while deleting temporary user record from Identity database.", e); } finally { IdentityDatabaseUtil.closeStatement(prepStmt); IdentityDatabaseUtil.closeConnection(connection); } }
Source:
<code>public Date getLastHeartBeat() { <START> return lastHeartBeat; <END> }</code><technical_language>return defensive copy "new Date(lastHeartBeat.getTime())" immutable</technical_language>

Target:
public Date getLastHeartBeat() { return new Date(lastHeartBeat); }
Source:
<code>void initRepoCache() { <START> lockAnd( () -> { <END> if ( !resourceMap.isEmpty() ) { repoQueue.addAll( resourceMap.keySet() ); sortRepoQueue(); } hasMore = !repoQueue.isEmpty() && !resourceMap.isEmpty(); return null; } ); }</code><technical_language>Locker Weft here</technical_language>

Target:
void initRepoCache() { lockAnd( t -> { if ( !resourceCache.isEmpty() ) { for ( RemoteRepository repo : resourceCache.execute( c -> c.keySet() ) ) { if ( !repoQueue.contains( repo ) ) { repoQueue.add( repo ); } } sortRepoQueue(); } hasMore = !repoQueue.isEmpty() && !resourceCache.isEmpty(); return null; } ); }
Source:
<code>public boolean isSingleton() { <START> return true; <END> }</code><technical_language>unsure if singleton is option asterisk connection is created managed endpoint if declare singleton conflicts if producer/consumers do a login/logout/addListener</technical_language>

Target:
public boolean isSingleton() { return false; }
Source:
<code>protected void onDestroy() { super.onDestroy(); if (iconSpinningAnimator != null) { <START> iconSpinningAnimator.end(); <END> } mapView.onDestroy(); }</code><technical_language>cancel() preferred end() assigns final send another unnecessary update (I verify this though)</technical_language>

Target:
protected void onDestroy() { super.onDestroy(); if (iconSpinningAnimator != null) { iconSpinningAnimator.cancel(); } mapView.onDestroy(); }
Source:
<code>protected Address getReplyToAddress(Message request) throws Exception { Address replyTo = request.getMessageProperties().getReplyToAddress(); <START> Address defaultReplyTo = delegatingHandler.getDefaultReplyTo(); <END> if (replyTo == null && defaultReplyTo == null) { throw new AmqpException( "Cannot determine ReplyTo message property value: " + "Request message does not contain reply-to property, " + "and no @SendTo annotation found."); } return replyTo == null ? defaultReplyTo : replyTo; }</code><technical_language>solution weak. I understand classes part of infrastructure is called in right order, this filed null, if call configureListenerAdapter</technical_language>

Target:
protected Address getReplyToAddress(Message request) throws Exception { Address replyTo = request.getMessageProperties().getReplyToAddress(); Address defaultReplyTo = null; if (delegatingHandler != null) { defaultReplyTo = delegatingHandler.getDefaultReplyTo(); } if (replyTo == null && defaultReplyTo == null) { throw new AmqpException( "Cannot determine ReplyTo message property value: " + "Request message does not contain reply-to property, " + "and no @SendTo annotation found."); } return replyTo == null ? defaultReplyTo : replyTo; }
Source:
<code>public Sequence<T> run(final Query<T> query, final Map<String, Object> responseContext) { if (query instanceof BaseQuery) { final BaseQuery singleSourceBaseQuery = (BaseQuery) query; final DataSource dataSource = singleSourceBaseQuery.getDataSource(); if (dataSource instanceof UnionDataSource) { return new MergeSequence<>( query.getResultOrdering(), Sequences.simple( Lists.transform( ((UnionDataSource) dataSource).getDataSources(), new Function<DataSource, Sequence<T>>() { @Override public Sequence<T> apply(DataSource singleSource) { return baseRunner.run( singleSourceBaseQuery.withDataSource(singleSource), responseContext ); } } ) ) ); <START> } else { <END> return baseRunner.run(query, responseContext); } } else { return baseRunner.run(query, responseContext); } }</code><technical_language>fall return baseRunner.run(query, responseContext); statement in this method</technical_language>

Target:
public Sequence<T> run(final Query<T> query, final Map<String, Object> responseContext) { if (query instanceof BaseQuery) { final BaseQuery singleSourceBaseQuery = (BaseQuery) query; final DataSource dataSource = singleSourceBaseQuery.getDataSource(); if (dataSource instanceof UnionDataSource) { return new MergeSequence<>( query.getResultOrdering(), Sequences.simple( Lists.transform( ((UnionDataSource) dataSource).getDataSources(), new Function<DataSource, Sequence<T>>() { @Override public Sequence<T> apply(DataSource singleSource) { return baseRunner.run( singleSourceBaseQuery.withDataSource(singleSource), responseContext ); } } ) ) ); } else { return baseRunner.run(query, responseContext); } } else { throw new UnsupportedOperationException(); } }
Source:
<code>private void finishVerification() { <START> Hashtable<Object, Object> resourcePaths = new Hashtable<Object, Object>(); <END> Enumeration<Object> keys = fExpectedChanges.keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); resourcePaths.put(key, key); } keys = resourcePaths.keys(); while (keys.hasMoreElements()) { IPath resourcePath = (IPath) keys.nextElement(); fMessage.append("Checking expectations for "); fMessage.append(resourcePath); fMessage.append("\n"); ExpectedChange expectedChange = fExpectedChanges.remove(resourcePath); if (expectedChange != null) { recordMissingActualChange(expectedChange.getKind(), expectedChange.getChangeFlags()); } } }</code><technical_language>If Object type of key in fExpectedChanges, this method Object generification</technical_language>

Target:
private void finishVerification() { Hashtable<IPath, IPath> resourcePaths = new Hashtable<IPath, IPath>(); Enumeration<IPath> keys = fExpectedChanges.keys(); while (keys.hasMoreElements()) { IPath key = keys.nextElement(); resourcePaths.put(key, key); } keys = resourcePaths.keys(); while (keys.hasMoreElements()) { IPath resourcePath = keys.nextElement(); fMessage.append("Checking expectations for "); fMessage.append(resourcePath); fMessage.append("\n"); ExpectedChange expectedChange = fExpectedChanges.remove(resourcePath); if (expectedChange != null) { recordMissingActualChange(expectedChange.getKind(), expectedChange.getChangeFlags()); } } }
Source:
<code>public void setQueryExpression(Expression queryExpression) { <START> this.queryExpression = queryExpression; <END> }</code><technical_language>Assert.notNull() - for fail fast, support null for this property</technical_language>

Target:
public void setQueryExpression(Expression queryExpression) { Assert.notNull(queryExpression, "queryExpression must not be null."); this.queryExpression = queryExpression; }
Source:
<code>private Map<String, Object> mergeExtensions(final NagiosExtension nagiosExtension) { final Map<String, Object> extensionMap = Maps.newHashMap(); <START> if (nagiosExtension == null) { <END> return Collections.emptyMap(); } extensionMap.put(NAGIOS_EXTENSION_SEVERITY_KEY, nagiosExtension.getSeverity()); extensionMap.put(NAGIOS_EXTENSION_NOTIFY_KEY, nagiosExtension.getNotify()); extensionMap.put(NAGIOS_EXTENSION_MAX_CHECK_ATTEMPTS_KEY, nagiosExtension.getMaxCheckAttempts()); extensionMap.put(NAGIOS_EXTENSION_FRESHNESS_THRESHOLD_KEY, nagiosExtension.getFreshnessThreshold().getStandardSeconds()); return extensionMap; }</code><technical_language>do this check creating extensionMap</technical_language>

Target:
private Map<String, Object> mergeExtensions(final NagiosExtension nagiosExtension) { if (nagiosExtension == null) { return Collections.emptyMap(); } final Map<String, Object> extensionMap = Maps.newHashMap(); extensionMap.put(NAGIOS_EXTENSION_SEVERITY_KEY, nagiosExtension.getSeverity()); extensionMap.put(NAGIOS_EXTENSION_NOTIFY_KEY, nagiosExtension.getNotify()); extensionMap.put(NAGIOS_EXTENSION_MAX_CHECK_ATTEMPTS_KEY, nagiosExtension.getMaxCheckAttempts()); extensionMap.put(NAGIOS_EXTENSION_FRESHNESS_THRESHOLD_KEY, nagiosExtension.getFreshnessThreshold().getStandardSeconds()); return extensionMap; }
Source:
<code>public static @Nonnull <TFacet extends FingerprintFacet> Collection<TFacet> getFacets (@Nonnull String id, @Nonnull Class<TFacet> facetClass) { final Fingerprint fp = ofNoException(id); <START> return (fp != null) ? getFacets(fp, facetClass) : CollectionUtils.EMPTY_COLLECTION; <END> }</code><technical_language>Collections.<TFacet>emptySet()</technical_language>

Target:
public static @Nonnull <TFacet extends FingerprintFacet> Collection<TFacet> getFacets (@Nonnull String id, @Nonnull Class<TFacet> facetClass) { final Fingerprint fp = ofNoException(id); return (fp != null) ? getFacets(fp, facetClass) : Collections.<TFacet>emptySet(); }
Source:
<code>protected static ClassificationRequest createClassificationRequest(FlowDocument document) { <START> if (document.isInitiator() == null) { <END> return null; } final ClassificationRequest request = new ClassificationRequest(); request.setProtocol(Protocols.getProtocol(document.getProtocol())); request.setLocation(document.getLocation()); if (document.isInitiator()) { request.setIpAddress(document.getDstAddr()); request.setPort(document.getDstPort()); } else { request.setIpAddress(document.getSrcAddr()); request.setPort(document.getSrcPort()); } return request; }</code><technical_language>call this, if isInitiator() returns null here</technical_language>

Target:
protected static ClassificationRequest createClassificationRequest(FlowDocument document) { final ClassificationRequest request = new ClassificationRequest(); request.setProtocol(Protocols.getProtocol(document.getProtocol())); request.setLocation(document.getLocation()); if (document.isInitiator()) { request.setIpAddress(document.getDstAddr()); request.setPort(document.getDstPort()); } else { request.setIpAddress(document.getSrcAddr()); request.setPort(document.getSrcPort()); } return request; }
Source:
<code>private void onFingerprintAuthenticated(int userId) { Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated"); mUserFingerprintAuthenticated.put(userId, true); if (getUserCanSkipBouncerForFingerprint(userId)) { <START> mTrustManager.unlockedByBiometricsForUser(userId); <END> } mFingerprintCancelSignal = null; for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onFingerprintAuthenticated(userId); } } mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_BIOMETRICS_AUTHENTICATION_CONTINUE), BIOMETRICS_CONTINUE_DELAY_MS); mAssistantVisible = false; Trace.endSection(); }</code><technical_language>This a constant biometric unlocked it</technical_language>

Target:
private void onFingerprintAuthenticated(int userId) { Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated"); mUserFingerprintAuthenticated.put(userId, true); if (getUserCanSkipBouncerForFingerprint(userId)) { mTrustManager.unlockedByBiometricsForUser(userId, DevicePolicyManager.KEGUARD_BIOMETRIC_TYPE_FINGERPRINT); } mFingerprintCancelSignal = null; for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onFingerprintAuthenticated(userId); } } mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_BIOMETRICS_AUTHENTICATION_CONTINUE), BIOMETRICS_CONTINUE_DELAY_MS); mAssistantVisible = false; Trace.endSection(); }
Source:
<code>public void RestartMaster(String deviceId) { Reader reader = null; logger.debug( "Restart master device id '{}'", deviceId); try { HttpURLConnection httpURLConnection; <START> httpURLConnection = (HttpURLConnection) new URL(API_URL + "device/restart" + <END> "?authToken=" + this.authToken + "&id=" + deviceId) .openConnection(); InputStream inputStream = httpURLConnection.getInputStream(); reader = new InputStreamReader(inputStream, "UTF-8"); JsonObject jsonObject = (JsonObject) jsonParser.parse(reader); String status = jsonObject.get("status").getAsString(); if(!status.equals("ok")){ String error = jsonObject.get("error").getAsString(); logger.error("Unable to restart master device '{}' error '{}'", deviceId, error); } } catch(Exception ex) { logger.error("Error restart master device: '{}'", ex.toString()); } finally { if (reader != null) { try { reader.close(); } catch (IOException ignored) { } } } }</code><technical_language>please assign URL a local variable opening connection? This helps while debugging problems</technical_language>

Target:
public void RestartMaster(String deviceId) { Reader reader = null; logger.debug("Restart master device id '{}'", deviceId); try { String url = API_URL + "device/restart" + "?authToken=" + this.authToken + "&id=" + deviceId; HttpURLConnection httpURLConnection; httpURLConnection = (HttpURLConnection) new URL(url) .openConnection(); InputStream inputStream = httpURLConnection.getInputStream(); reader = new InputStreamReader(inputStream, "UTF-8"); JsonObject jsonObject = (JsonObject) jsonParser.parse(reader); String status = jsonObject.get("status").getAsString(); if (!status.equals("ok")) { String error = jsonObject.get("error").getAsString(); logger.error("Unable to restart master device '{}' error '{}'", deviceId, error); } } catch (Exception ex) { logger.error("Error restart master device: '{}'", ex.toString()); } finally { if (reader != null) { try { reader.close(); } catch (IOException ignored) { } } } }
Source:
<code>public void close() throws SQLException { conn.close(); JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:mem:test"); conn = ds.getConnection(); try { ResultSet rs = conn.getMetaData().getTables(null, null, null, new String[]{"TABLE"}); boolean result = false; while(rs.next()) { result=true; <START> System.out.printf("%s\n", rs.getString("TABLE_NAME")); <END> } assertThat(result, describedAs("connection closed", is(false))); } finally { conn.close(); } }</code><technical_language>Please do write System.out in tests. Please a logger instead</technical_language>

Target:
public void close() throws SQLException { conn.close(); JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:mem:test"); try (Connection testConn = ds.getConnection()) { try (ResultSet rs = testConn.getMetaData().getTables(null, null, null, new String[]{"TABLE"})) { boolean result = false; while(rs.next()) { result = true; } assertThat(result, describedAs("connection closed", is(false))); } } }
Source:
<code>public ExternalBeanRef(String modelFieldName, String beanInfo, ModelUsage usage) throws Exception { this.modelFieldName = modelFieldName; this.usage = usage; try { <START> this.beanDefinition = new ExternalBeanDefinition(beanInfo); <END> } catch (Exception e) { throw new Exception("Unable to construct ExternalBeanRef. ", e); } }</code><technical_language>Please reformat this try-catch</technical_language>

Target:
public ExternalBeanRef(String modelFieldName, String beanInfo, ModelUsage usage) throws IllegalArgumentException { this.modelFieldName = modelFieldName; this.usage = usage; try { this.beanDefinition = new ExternalBeanDefinition(beanInfo); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("Unable to construct ExternalBeanRef. ", e); } }
Source:
<code><START> private boolean validate() throws IntegerValidationException { <END> for (int i = 0; i < numberOfKeys; i++) { final int result = parameterWorker.pull(startKey + i); if (expectedResult != result) { LOG.log(Level.WARNING, "For key {0}, expected value {1} but received {2}", new Object[]{startKey + i, expectedResult, result}); throw new IntegerValidationException(startKey + i, expectedResult, result); } else { LOG.log(Level.INFO, "For key {0}, received expected value {1}.", new Object[]{startKey + i, expectedResult}); } } return true; }</code><technical_language>Hmm.. return false validation fails? This method return false. throw IntegerValidationException extends RuntimeException L137..</technical_language>

Target:
private boolean validate() { for (int i = 0; i < numberOfKeys; i++) { final int result = parameterWorker.pull(startKey + i); if (expectedResult != result) { LOG.log(Level.WARNING, "For key {0}, expected value {1} but received {2}", new Object[]{startKey + i, expectedResult, result}); return false; } else { LOG.log(Level.INFO, "For key {0}, received expected value {1}.", new Object[]{startKey + i, expectedResult}); } } return true; }
Source:
<code>private Object[][] placedTests() { return new Object[][] { {false, false, false, false}, <START> {true, false, false, true} <END> }; }</code><technical_language>returned isPlaced depends mapped flag well. a lot simpler if this provider tuples of [seqID, start, mappedFlag, usePositionDeltaEncoding, expectedIsPlaced], test cases for combination, test created a new record for case values, verified isPlaced</technical_language>

Target:
private Object[][] placedTests() { final List<Object[]> retval = new ArrayList<>(); final int validSeqId = 0; final int[] sequenceIds = new int[]{ SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX, validSeqId }; final int validAlignmentStart = 1; final int[] starts = new int[]{ SAMRecord.NO_ALIGNMENT_START, validAlignmentStart }; final boolean[] deltas = new boolean[] { true, false }; final boolean[] mappeds = new boolean[] { true, false }; for (final int sequenceId : sequenceIds) { for (final int start : starts) { for (final boolean delta : deltas) { for (final boolean mapped : mappeds) { boolean placementExpectation = true; if (sequenceId == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) { placementExpectation = false; } if (!delta && start == SAMRecord.NO_ALIGNMENT_START) { placementExpectation = false; } retval.add(new Object[]{sequenceId, start, mapped, delta, placementExpectation}); } } } } return retval.toArray(new Object[0][0]); }
Source:
<code>private void eventuallyAssertEvictions(float expectedValue) { eventuallyAssertAttributeValue("Evictions", expectedValue); <START> assert expectedValue == advanced.getStats().getEvictions(); <END> }</code><technical_language>updating code replace plain asserts testing framework</technical_language>

Target:
private void eventuallyAssertEvictions(float expectedValue) { eventuallyAssertAttributeValue("Evictions", expectedValue); assertEquals(expectedValue, (float) advanced.getStats().getEvictions()); }
Source:
<code>public DbUser(DbUser dbUser) { if (dbUser == null) { loginName = ""; firstName = ""; lastName = ""; department = ""; groupNames = Collections.emptyList(); groupIds = Collections.emptyList(); note = ""; userOptions = <START> new HashMap<>(); <END> } else { id = dbUser.getId(); externalId = dbUser.getExternalId(); domain = dbUser.getDomain(); namespace = dbUser.getNamespace(); loginName = dbUser.getLoginName(); setFirstName(firstName = dbUser.getFirstName()); setLastName(lastName = dbUser.getLastName()); setDepartment(dbUser.getDepartment()); email = dbUser.getEmail(); note = dbUser.getNote(); groupIds = new ArrayList<>(dbUser.getGroupIds()); groupNames = new ArrayList<>(dbUser.getGroupNames()); isAdmin = dbUser.isAdmin(); userOptions = new HashMap<>(dbUser.getUserOptions()); } }</code><technical_language>Collections.emptyMap()</technical_language>

Target:
public DbUser(DbUser dbUser) { if (dbUser == null) { loginName = ""; firstName = ""; lastName = ""; department = ""; groupNames = Collections.emptyList(); groupIds = Collections.emptyList(); note = ""; userOptions = Collections.emptyMap(); } else { id = dbUser.getId(); externalId = dbUser.getExternalId(); domain = dbUser.getDomain(); namespace = dbUser.getNamespace(); loginName = dbUser.getLoginName(); setFirstName(firstName = dbUser.getFirstName()); setLastName(lastName = dbUser.getLastName()); setDepartment(dbUser.getDepartment()); email = dbUser.getEmail(); note = dbUser.getNote(); groupIds = new ArrayList<>(dbUser.getGroupIds()); groupNames = new ArrayList<>(dbUser.getGroupNames()); isAdmin = dbUser.isAdmin(); userOptions = new HashMap<>(dbUser.getUserOptions()); } }
Source:
<code>public boolean openPort() throws Exception { responseMessageHandler = new ResponseMessageHandler(); try { client = new Socket(host, port); } catch( BindException e) { <START> throw new ConnectionException("Could not bind a local port."); <END> } catch( NoRouteToHostException e) { throw new ConnectionException("No route to host. The remote host may not be running, blocked by a firewall, or disconnected."); } catch( PortUnreachableException e) { throw new ConnectionException("The port is unreachable on the remote host. The server may not be running, or blocked by a firewall."); } catch (SocketException e) { e.printStackTrace(); } if (client == null) { throw new ConnectionException("Socket unable to connect."); } bufOut = client.getOutputStream(); inStream = new InputStreamReader(client.getInputStream()); bufIn = new BufferedReader(inStream); replyThread = new Thread(this); replyThread.start(); return client.isConnected(); }</code><technical_language>I original exception added a argument. easier debug if is wrong</technical_language>

Target:
public boolean openPort() throws Exception { responseMessageHandler = new ResponseMessageHandler(); try { client = new Socket(host, port); } catch( BindException e) { throw new ConnectionException("Could not bind a local port.", e); } catch( NoRouteToHostException e) { throw new ConnectionException("No route to host. The remote host may not be running, blocked by a firewall, or disconnected.", e); } catch( ConnectException e) { throw new ConnectionException("The port is unreachable on the remote host. The server may not be running, or blocked by a firewall.", e); } if (client == null) { throw new ConnectionException("Socket unable to connect."); } bufOut = client.getOutputStream(); inStream = new InputStreamReader(client.getInputStream()); bufIn = new BufferedReader(inStream); replyThread = new Thread(this); replyThread.start(); return client.isConnected(); }
Source:
<code><START> public void setBaudRate(int b) { <END> baudRate = b; }</code><technical_language>I references this setter, restore this class? This class is meant constructed values creation. a properties file support serial settings, in: /romraider/src/main/java/com/romraider/logger/external/apsx/plugin/ApsxDataSource.java</technical_language>

Target:
public void setBaudRate(int b) { }
Source:
<code>private void stageSchemaFiles(Configuration config) { if (config.m_userSchema == null) { return; } assert( config.m_userSchema.isFile() ); File stagedCatalogFH = new VoltFile(getStagedCatalogPath(getVoltDBRootPath())); if (!config.m_forceVoltdbCreate && stagedCatalogFH.exists()) { VoltDB.crashLocalVoltDB("A previous database was initialized with a schema. You must init with --force to overwrite the schema."); } final boolean standalone = false; final boolean isXCDR = false; VoltCompiler compiler = new VoltCompiler(standalone, isXCDR); <START> if (!compiler.compileFromDDL(true, stagedCatalogFH.getAbsolutePath(), config.m_userSchema.getAbsolutePath())) { <END> VoltDB.crashLocalVoltDB("Could not compile specified schema " + config.m_userSchema); } }</code><technical_language>this true moved a flag voltcompiler</technical_language>

Target:
private void stageSchemaFiles(Configuration config) { if (config.m_userSchema == null) { return; } assert( config.m_userSchema.isFile() ); File stagedCatalogFH = new VoltFile(getStagedCatalogPath(getVoltDBRootPath())); if (!config.m_forceVoltdbCreate && stagedCatalogFH.exists()) { VoltDB.crashLocalVoltDB("A previous database was initialized with a schema. You must init with --force to overwrite the schema."); } final boolean standalone = false; final boolean isXCDR = false; VoltCompiler compiler = new VoltCompiler(standalone, isXCDR); compiler.setInitializeDDLWithFiltering(true); if (!compiler.compileFromSchemaAndClasses(config.m_userSchema, config.m_stagedClassesPath, stagedCatalogFH)) { VoltDB.crashLocalVoltDB("Could not compile specified schema " + config.m_userSchema); } }
Source:
<code><START> protected E[] loadServices(final Class<E> service, final ClassLoader classLoader) { <END> ArrayList<E> list = new ArrayList<>(); ServiceLoader<E> loader = ServiceLoader.load(service, classLoader); Iterator<E> iterator = loader.iterator(); for (;;) try { if (! iterator.hasNext()) { return list.toArray(Arrays2.createArray(service, list.size())); } list.add(iterator.next()); } catch (ServiceConfigurationError ignored) { } }</code><technical_language>I this protected; needlessly increase API surface area (and guarantee want refactor this level). Package-private is choice here</technical_language>

Target:
E[] loadServices(final Class<E> service, final ClassLoader classLoader) { ArrayList<E> list = new ArrayList<>(); ServiceLoader<E> loader = ServiceLoader.load(service, classLoader); Iterator<E> iterator = loader.iterator(); for (;;) try { if (! iterator.hasNext()) { return list.toArray(Arrays2.createArray(service, list.size())); } list.add(iterator.next()); } catch (ServiceConfigurationError ignored) { } }
Source:
<code>public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { <START> List<TmfAnalysisRequirement> requirements = new LinkedList<>(); <END> List<String> eventNames = new LinkedList<>(); eventNames.add(LttngStrings.EXIT_SYSCALL); eventNames.add(LttngStrings.IRQ_HANDLER_ENTRY); eventNames.add(LttngStrings.IRQ_HANDLER_EXIT); eventNames.add(LttngStrings.SOFTIRQ_ENTRY); eventNames.add(LttngStrings.SOFTIRQ_EXIT); eventNames.add(LttngStrings.SOFTIRQ_RAISE); eventNames.add(LttngStrings.SCHED_SWITCH); eventNames.add(LttngStrings.SCHED_PROCESS_FORK); eventNames.add(LttngStrings.SCHED_PROCESS_EXIT); eventNames.add(LttngStrings.SCHED_PROCESS_FREE); eventNames.add(LttngStrings.STATEDUMP_PROCESS_STATE); eventNames.add(LttngStrings.SCHED_WAKEUP); eventNames.add(LttngStrings.SCHED_WAKEUP_NEW); eventNames.add(LttngStrings.SYSCALL_PREFIX); TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN); domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY); requirements.add(domainReq); requirements.add(new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, eventNames, ValuePriorityLevel.MANDATORY)); return requirements; }</code><technical_language>If this array meant modified aftewards, ImmutableList, read performance (and potential synchronization issues)</technical_language>

Target:
public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { if (fRequirements == null) { ImmutableList<String> eventNames = ImmutableList.of(LttngStrings.EXIT_SYSCALL, LttngStrings.IRQ_HANDLER_ENTRY, LttngStrings.IRQ_HANDLER_EXIT, LttngStrings.SOFTIRQ_ENTRY, LttngStrings.SOFTIRQ_EXIT, LttngStrings.SOFTIRQ_RAISE, LttngStrings.SCHED_SWITCH, LttngStrings.SCHED_PROCESS_FORK, LttngStrings.SCHED_PROCESS_EXIT, LttngStrings.SCHED_PROCESS_FREE, LttngStrings.STATEDUMP_PROCESS_STATE, LttngStrings.SCHED_WAKEUP, LttngStrings.SCHED_WAKEUP_NEW, LttngStrings.SYSCALL_PREFIX); TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN); domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY); fRequirements = ImmutableList.of(domainReq, new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, eventNames, ValuePriorityLevel.MANDATORY)); } return fRequirements; }
Source:
<code>private static String normalizeIfBracketed(String value) { if (value.startsWith("(") && value.endsWith(")")) { <START> return "-" + value.replace("(", "").replace(")", ""); <END> } else { return value; } }</code><technical_language>If input string is "(123(456)" this approach strip middle bracket parse shouldn't. need substring()</technical_language>

Target:
private static String normalizeIfBracketed(String value) { if (value.length() > 2 && value.startsWith("(") && value.endsWith(")")) { String valueWithoutBrackets = value.substring(1, value.length() - 1); return "-" + valueWithoutBrackets; } else { return value; } }
Source:
<code>public synchronized void internalCallScene(Short sceneNumber) { logger.debug("call Scene id dSID {}", sceneNumber, dsid.getValue()); if (isDeviceWithOutput()) { activeSceneNumber = sceneNumber; informLastSceneAboutSceneCall(sceneNumber); if (!isShade()) { outputValueBeforeSceneCall = this.outputValue; } else { outputValueBeforeSceneCall = this.slatPosition; if (isBlind()) { slatAngleBeforeSceneCall = this.slatAngle; } } if (!checkSceneNumber(sceneNumber)) { if (containsSceneConfig(sceneNumber)) { if (doIgnoreScene(sceneNumber)) { return; } } else { this.deviceStateUpdates.add(new DeviceStateUpdateImpl(DeviceStateUpdate.UPDATE_SCENE_CONFIG, new Short[] { sceneNumber, 0 })); } if (sceneOutputMap.get(sceneNumber) != null) { if (!isShade()) { updateInternalDeviceState(new DeviceStateUpdateImpl(DeviceStateUpdate.OUTPUT, sceneOutputMap.get(sceneNumber)[0])); } else { updateInternalDeviceState(new DeviceStateUpdateImpl(DeviceStateUpdate.SLATPOSITION, sceneOutputMap.get(sceneNumber)[0])); if (isBlind()) { updateInternalDeviceState(new DeviceStateUpdateImpl(DeviceStateUpdate.SLAT_ANGLE, <START> sceneOutputMap.get(sceneNumber)[1])); <END> } } } else { this.deviceStateUpdates.add(new DeviceStateUpdateImpl(DeviceStateUpdate.UPDATE_SCENE_OUTPUT, new Short[] { sceneNumber, 0 })); } } } }</code><technical_language>this another "magic contract", defines position 1 of sceneOutputMap.get(sceneNumber) is responsible for blinds? A named reference more readable maintainable..</technical_language>

Target:
public synchronized void internalCallScene(Short sceneNumber) { logger.debug("call Scene id dSID {}", sceneNumber, dsid.getValue()); if (isDeviceWithOutput()) { activeSceneNumber = sceneNumber; informLastSceneAboutSceneCall(sceneNumber); if (!isShade()) { outputValueBeforeSceneCall = this.outputValue; } else { outputValueBeforeSceneCall = this.slatPosition; if (isBlind()) { slatAngleBeforeSceneCall = this.slatAngle; } } if (!checkSceneNumber(sceneNumber)) { if (containsSceneConfig(sceneNumber)) { if (doIgnoreScene(sceneNumber)) { return; } } else { this.deviceStateUpdates.add(new DeviceStateUpdateImpl(DeviceStateUpdate.UPDATE_SCENE_CONFIG, new Short[] { sceneNumber, GeneralLibConstance.HIGHEST_READ_OUT_PRIORITY })); } if (sceneOutputMap.get(sceneNumber) != null) { if (!isShade()) { updateInternalDeviceState(new DeviceStateUpdateImpl(DeviceStateUpdate.OUTPUT, sceneOutputMap.get(sceneNumber)[GeneralLibConstance.SCENE_ARRAY_INDEX_VALUE])); } else { updateInternalDeviceState(new DeviceStateUpdateImpl(DeviceStateUpdate.SLATPOSITION, sceneOutputMap.get(sceneNumber)[GeneralLibConstance.SCENE_ARRAY_INDEX_VALUE])); if (isBlind()) { updateInternalDeviceState(new DeviceStateUpdateImpl(DeviceStateUpdate.SLAT_ANGLE, sceneOutputMap.get(sceneNumber)[GeneralLibConstance.SCENE_ARRAY_INDEX_ANGLE])); } } } else { this.deviceStateUpdates.add(new DeviceStateUpdateImpl(DeviceStateUpdate.UPDATE_SCENE_OUTPUT, new Short[] { sceneNumber, GeneralLibConstance.HIGHEST_READ_OUT_PRIORITY })); } } } }
Source:
<code>private void onMatchingPipeline(Pipeline pipeline) { log.info("Found matching pipeline {}:{}", pipeline.getApplication(), pipeline.getName()); val id = registry.createId("pipelines.triggered") .withTag("application", pipeline.getApplication()) .withTag("name", pipeline.getName()); if (pipeline.getTrigger().getType() == JENKINS_TRIGGER_TYPE) { id.withTag("job", pipeline.getTrigger().getJob()); } <START> if (pipeline.getTrigger().getType() == GIT_TRIGGER_TYPE) { <END> id.withTag("repository", pipeline.getTrigger().getProject() + ' ' + pipeline.getTrigger().getSlug()); } registry.counter(id).increment(); }</code><technical_language>this else if</technical_language>

Target:
private void onMatchingPipeline(Pipeline pipeline) { log.info("Found matching pipeline {}:{}", pipeline.getApplication(), pipeline.getName()); val id = registry.createId("pipelines.triggered") .withTag("application", pipeline.getApplication()) .withTag("name", pipeline.getName()); if (pipeline.getTrigger().getType() == JENKINS_TRIGGER_TYPE) { id.withTag("job", pipeline.getTrigger().getJob()); } else if (pipeline.getTrigger().getType() == GIT_TRIGGER_TYPE) { id.withTag("repository", pipeline.getTrigger().getProject() + ' ' + pipeline.getTrigger().getSlug()); } registry.counter(id).increment(); }
Source:
<code><START> public int furnaceminecart$getFuel() { <END> return this.fuel; }</code><technical_language>Prefixes left changing hard implements, needs removing. (also remember put @Override)</technical_language>

Target:
public int getFuel() { return this.fuel; }
Source:
<code>public static SimpleTimeLimiter createSimpleTimeLimiter(ExecutorService executorService) { try { if (CREATE_STL != null) { return (SimpleTimeLimiter) CREATE_STL.invoke(null, executorService); } else if (CONSTRUCT_STL != null) { return CONSTRUCT_STL.newInstance(executorService); } } catch (IllegalAccessException iae) { } catch (InstantiationException ie) { } catch (InvocationTargetException ite) { <START> throw Throwables.propagate(ite.getCause()); <END> } throw new UnsupportedOperationException("Can't construct SimpleTimeLimiter"); }</code><technical_language>This is right -- want propagate actual exception, cause. this propagate exceptions. Finally ou throw RuntimeException; Guava deprecated Throwables.propagate</technical_language>

Target:
public static SimpleTimeLimiter createSimpleTimeLimiter(ExecutorService executorService) { try { if (CREATE_STL != null) { return (SimpleTimeLimiter) CREATE_STL.invoke(null, executorService); } else if (CONSTRUCT_STL != null) { return CONSTRUCT_STL.newInstance(executorService); } throw new UnsupportedOperationException( "Can't find SimpleTimeLimiter creator or constructor taking ExecutorService"); } catch (IllegalAccessException iae) { throw new UnsupportedOperationException("Can't access SimpleTimeLimiter method/ctor", iae); } catch (InstantiationException ie) { throw new UnsupportedOperationException("Can't construct SimpleTimeLimiter", ie); } catch (InvocationTargetException ite) { Throwable throwable = ite.getCause(); if (throwable instanceof RuntimeException) { throw (RuntimeException) throwable; } if (throwable instanceof Error) { throw (Error) throwable; } throw new UnsupportedOperationException( "Checked exception thrown while creating SimpleTimeLimiter", throwable); } }
Source:
<code>public void testReturnKey() throws Exception { long[] ids = b.insertNames("a", "b", "c", "d", "e"); <START> assertThat(ids).containsExactly(new long[] { 1, 2, 3, 4, 5 }); <END> }</code><technical_language>Meh: This is a vararg method. I .containsExactly(1, 2, 3, 4, 5)</technical_language>

Target:
public void testReturnKey() throws Exception { long[] ids = b.insertNames("a", "b", "c", "d", "e"); assertThat(ids).containsExactly(1, 2, 3, 4, 5); }
Source:
<code>public void onStarted(Run r, TaskListener listener) { if (r instanceof AbstractBuild) { Node node = getCurrentNode(); if (node instanceof MesosSlave) { try { Computer computer = node.toComputer(); if (computer != null) { EnvVars environment = computer.getEnvironment(); String hostname; if(isBuildRunningInsideContainer(environment)) { hostname = environment.get(HOSTNAME); }else { <START> hostname = node.toComputer().getHostName(); <END> } listener.getLogger().println("Mesos slave(hostname): " + hostname); } else { listener.getLogger().println("Mesos slave(computer is null)"); } } catch (IOException e) { LOGGER.warning("IOException while trying to get hostname: " + e); e.printStackTrace(); } catch (InterruptedException e) { LOGGER.warning("InterruptedException while trying to get hostname: " + e); } } } }</code><technical_language>hostname = computer.getHostName();</technical_language>

Target:
public void onStarted(Run r, TaskListener listener) { if (r instanceof AbstractBuild) { Node node = getCurrentNode(); if (node instanceof MesosSlave) { try { String hostname = null; Computer computer = node.toComputer(); MesosSlave mesosSlave = (MesosSlave) node; if (mesosSlave.getSlaveInfo().getContainerInfo() != null && DOCKER.equals(mesosSlave.getSlaveInfo().getContainerInfo().getType())) { if (computer != null) { EnvVars environment = computer.getEnvironment(); hostname = environment.get(HOSTNAME); } } else { if(computer != null) { hostname = computer.getHostName(); } } listener.getLogger().println("Mesos slave(hostname): " + hostname); } catch (IOException e) { LOGGER.warning("IOException while trying to get hostname: " + e); e.printStackTrace(); } catch (InterruptedException e) { LOGGER.warning("InterruptedException while trying to get hostname: " + e); } } } }
Source:
<code>public Order cloneForDiscontinuing() { DrugOrder newOrder = new DrugOrder(); newOrder.setCareSetting(this.getCareSetting()); newOrder.setConcept(this.getConcept()); newOrder.setAction(Action.DISCONTINUE); newOrder.setPreviousOrder(this); newOrder.setPatient(this.getPatient()); newOrder.setDrug(this.getDrug()); newOrder.setStartDate(this.getStartDate()); <START> newOrder.setOrderer(this.getOrderer()); <END> return newOrder; }</code><technical_language>This is right provider prescribed order is person discontinue it, copy this field</technical_language>

Target:
public Order cloneForDiscontinuing() { DrugOrder newOrder = new DrugOrder(); newOrder.setCareSetting(this.getCareSetting()); newOrder.setConcept(this.getConcept()); newOrder.setAction(Action.DISCONTINUE); newOrder.setPreviousOrder(this); newOrder.setPatient(this.getPatient()); newOrder.setDrug(this.getDrug()); newOrder.setStartDate(this.getStartDate()); return newOrder; }
Source:
<code>public void copyAndVerify(Path destRoot, List<ReplChangeManager.FileInfo> srcFiles) throws IOException, LoginException, HiveFatalException { Map<FileSystem, Map< Path, List<ReplChangeManager.FileInfo>>> map = fsToFileMap(srcFiles, destRoot); UserGroupInformation proxyUser = getProxyUser(); try { for (Map.Entry<FileSystem, Map<Path, List<ReplChangeManager.FileInfo>>> entry : map.entrySet()) { Map<Path, List<ReplChangeManager.FileInfo>> destMap = entry.getValue(); for (Map.Entry<Path, List<ReplChangeManager.FileInfo>> destMapEntry : destMap.entrySet()) { Path destination = destMapEntry.getKey(); List<ReplChangeManager.FileInfo> fileInfoList = destMapEntry.getValue(); <START> if (fileInfoList.isEmpty()) { <END> continue; } FileSystem sourceFs = fileInfoList.get(0).getSourcePath().getFileSystem(hiveConf); boolean useRegularCopy = regularCopy(sourceFs, fileInfoList); if (!destinationFs.exists(destination) && !FileUtils.mkdir(destinationFs, destination, hiveConf)) { LOG.error("Failed to create destination directory: " + destination); throw new IOException("Destination directory creation failed"); } doCopyRetry(sourceFs, fileInfoList, destination, proxyUser, useRegularCopy); } } } finally { if (proxyUser != null) { FileSystem.closeAllForUGI(proxyUser); } } }</code><technical_language>In scenario, fileInfoList empty</technical_language>

Target:
public void copyAndVerify(Path destRoot, List<ReplChangeManager.FileInfo> srcFiles) throws IOException, LoginException, HiveFatalException { Map<FileSystem, Map< Path, List<ReplChangeManager.FileInfo>>> map = fsToFileMap(srcFiles, destRoot); UserGroupInformation proxyUser = getProxyUser(); try { for (Map.Entry<FileSystem, Map<Path, List<ReplChangeManager.FileInfo>>> entry : map.entrySet()) { Map<Path, List<ReplChangeManager.FileInfo>> destMap = entry.getValue(); for (Map.Entry<Path, List<ReplChangeManager.FileInfo>> destMapEntry : destMap.entrySet()) { Path destination = destMapEntry.getKey(); List<ReplChangeManager.FileInfo> fileInfoList = destMapEntry.getValue(); FileSystem sourceFs = fileInfoList.get(0).getSourcePath().getFileSystem(hiveConf); boolean useRegularCopy = regularCopy(sourceFs, fileInfoList); if (!destinationFs.exists(destination) && !FileUtils.mkdir(destinationFs, destination, hiveConf)) { LOG.error("Failed to create destination directory: " + destination); throw new IOException("Destination directory creation failed"); } doCopyRetry(sourceFs, fileInfoList, destination, proxyUser, useRegularCopy); } } } finally { if (proxyUser != null) { FileSystem.closeAllForUGI(proxyUser); } } }