auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRotate() throws Exception { final Calendar cal = Calendar.getInstance(); final String rotatedPath = BASE_LOG_DIR.toString() + "/" + FILENAME + rotateFormatter.format(cal.getTime()); File rotatedFile = new File(rotatedPath); testRotate(cal, rotatedFile); }

Target:
public void testRotate() throws Exception { final Calendar cal = Calendar.getInstance(); final String rotatedPath = BASE_LOG_DIR.toString() + File.separator + FILENAME + rotateFormatter.format(cal.getTime()); File rotatedFile = new File(rotatedPath); testRotate(cal, rotatedFile); }
Source:
private void deleteProcess(List<Process> processes, boolean contentOnly) { for (Process process : processes) { String title = process.getTitle(); if (contentOnly) { try { URI ocr = fileService.getOcrDirectory(process); if (fileService.fileExist(ocr)) { fileService.delete(ocr); } URI images = fileService.getImagesDirectory(process); if (fileService.fileExist(images)) { fileService.delete(images); } Helper.setMeldung("Content deleted for " + title); } catch (Exception e) { logger.error(e.getMessage(), e); Helper.setFehlerMeldung("Can not delete content for " + title, e); } } if (!contentOnly) { try { deleteMetadataDirectory(process); serviceManager.getProcessService().remove(process); Helper.setMeldung("Process " + title + " deleted."); } catch (DataException | IOException e) { logger.error(e.getMessage(), e); Helper.setFehlerMeldung("could not delete process " + title, e); } } } }

Target:
private void deleteProcess(List<Process> processes, boolean contentOnly) { for (Process process : processes) { String title = process.getTitle(); if (contentOnly) { try { URI ocr = fileService.getOcrDirectory(process); if (fileService.fileExist(ocr)) { fileService.delete(ocr); } URI images = fileService.getImagesDirectory(process); if (fileService.fileExist(images)) { fileService.delete(images); } Helper.setMeldung("Content deleted for " + title); } catch (IOException | RuntimeException e) { Helper.setErrorMessage("Can not delete content for " + title, logger, e); } } if (!contentOnly) { try { deleteMetadataDirectory(process); serviceManager.getProcessService().remove(process); Helper.setMeldung("Process " + title + " deleted."); } catch (DataException | IOException e) { Helper.setErrorMessage("could not delete process " + title, logger, e); } } } }
Source:
public void onResume() { super.onResume(); getResumePauseDisposable().add(mUser .observeOn(AndroidSchedulers.mainThread()) .subscribe(user -> updateUserViewContent())); getResumePauseDisposable().add(mFeedbacks .observeOn(AndroidSchedulers.mainThread()) .subscribe(feedbacks -> updateFeedbacksViewContent())); getResumePauseDisposable().add(mFavorite .observeOn(AndroidSchedulers.mainThread()) .subscribe(isFavorite -> { saveUserIfFavorite(); mCkbFavorite.setChecked(isFavorite); mImgFavorite.setColorFilter(isFavorite ? mFavoritedColor : mNonFavoritedColor); })); getResumePauseDisposable().add(mLastUserInfoLoadResult .filter(result -> !result.isHandled) .observeOn(AndroidSchedulers.mainThread()) .subscribe(result -> { result.isHandled = true; mDownloadUserInfoProgressDisposable.dispose(); if (result.throwable != null) { HttpErrorHelper.showErrorToast(getContext(), result.throwable); getFragmentManager().popBackStack(); } })); }

Target:
public void onResume() { super.onResume(); getResumePauseDisposable().add(mUser .observeOn(AndroidSchedulers.mainThread()) .subscribe(user -> updateUserViewContent())); getResumePauseDisposable().add(mFeedbacks .observeOn(AndroidSchedulers.mainThread()) .subscribe(feedbacks -> updateFeedbacksViewContent())); getResumePauseDisposable().add(mFavorite .observeOn(AndroidSchedulers.mainThread()) .subscribe(isFavorite -> { saveUserIfFavorite(); mCkbFavorite.setChecked(isFavorite); mImgFavorite.setColorFilter(isFavorite ? mFavoritedColor : mNonFavoritedColor); })); getResumePauseDisposable().add(mLastUserInfoLoadResult .filter(result -> !result.isHandled) .observeOn(AndroidSchedulers.mainThread()) .subscribe(result -> { result.isHandled = true; mDownloadUserInfoProgressDisposable.dispose(); if (result.throwable != null) { HttpErrorHelper.showErrorToast(getContext(), result.throwable); if (mUser.getValue() == null) { getFragmentManager().popBackStack(); } } })); }
Source:
public void makeBucket(MakeBucketArgs args) throws ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, RegionConflictException, ServerException, XmlParserException { checkArgs(args); String region = args.region(); if (this.region != null && !this.region.isEmpty()) { if (region != null && !region.equals(this.region)) { throw new IllegalArgumentException( "region must be " + this.region + ", but passed " + region); } region = this.region; } if (region == null) { region = US_EAST_1; } Multimap<String, String> headers = args.objectLock() ? newMultimap("x-amz-bucket-object-lock-enabled", "true") : null; try (Response response = execute( Method.PUT, args.bucket(), null, region, merge(args.extraHeaders(), headers), args.extraQueryParams(), (!region.equals(US_EAST_1)) ? new CreateBucketConfiguration(region) : null, 0)) { if (isAwsHost) { AwsRegionCache.INSTANCE.set(args.bucket(), region); } } }

Target:
public void makeBucket(MakeBucketArgs args) throws ErrorResponseException, IllegalArgumentException, InsufficientDataException, InternalException, InvalidBucketNameException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, RegionConflictException, ServerException, XmlParserException { checkArgs(args); String region = args.region(); if (this.region != null && !this.region.isEmpty()) { if (region != null && !region.equals(this.region)) { throw new IllegalArgumentException( "region must be " + this.region + ", but passed " + region); } region = this.region; } if (region == null) { region = US_EAST_1; } Multimap<String, String> headers = args.objectLock() ? newMultimap("x-amz-bucket-object-lock-enabled", "true") : null; try (Response response = execute( Method.PUT, args.bucket(), null, region, merge(args.extraHeaders(), headers), args.extraQueryParams(), region.equals(US_EAST_1) ? null : new CreateBucketConfiguration(region), 0)) { if (isAwsHost) { AwsRegionCache.INSTANCE.set(args.bucket(), region); } } }
Source:
public URLParams and(final String key, final long value) { map.put(key, "" + value); return this; }

Target:
public URLParams and(final String key, final long value) { map.put(key, String.valueOf(value)); return this; }
Source:
public List<HttpPipelinePolicy> getPolicies() { return this.policies; }

Target:
List<HttpPipelinePolicy> getPolicies() { return this.policies; }
Source:
public void testCreateNewRepos_MissingPermissions() throws Exception { File wcTree = new File("target/gen/CreateNewRepositoryTest_testCreateNewRepos"); Git git = null; try { git = Git.init().setBare(false).setDirectory(new File(wcTree.getAbsolutePath())).call(); } finally { if (git != null) { git.close(); } FileUtils.deleteDirectory(wcTree); } assertEquals("", errorOutputWriter.toString()); }

Target:
public void testCreateNewRepos_MissingPermissions() throws Exception { File wcTree = new File(getTemporaryDirectory(), "CreateNewRepositoryTest_testCreateNewRepos"); Git git = Git.init().setBare(false) .setDirectory(new File(wcTree.getAbsolutePath())).call(); addRepoToClose(git.getRepository()); assertEquals("", errorOutputWriter.toString()); }
Source:
} catch (IOException e) { System.out.println("Properties cannot be readed."); e.printStackTrace(); }

Target:
} catch (IOException e) { throw new RuntimeConfigurationException(e); }
Source:
public PropertiesConfigurationProvider(Properties properties, Map<String, String> variableValues) { this(properties, variableValues, new ObjectMapper()); }

Target:
public PropertiesConfigurationProvider(Properties properties, Map<String, String> variableValues) { this(properties, variableValues, null); }
Source:
public ExprEval apply(final List<Expr> args, final Expr.ObjectBinding bindings) { END if (args.size() < 2) { throw new IAE("'%s' must have at least 2 arguments"); } for (int i = 0; i < args.size(); i += 2) { if (i == args.size() - 1) { return args.get(i).eval(bindings); } else if (args.get(i).eval(bindings).asBoolean()) { return args.get(i + 1).eval(bindings); } } return ExprEval.of(null); }

Target:
public ExprEval apply(final List<Expr> args, final Expr.ObjectBinding bindings) { if (args.size() < 2) { throw new IAE("Function[%s] must have at least 2 arguments", name()); } for (int i = 0; i < args.size(); i += 2) { if (i == args.size() - 1) { return args.get(i).eval(bindings); } else if (args.get(i).eval(bindings).asBoolean()) { return args.get(i + 1).eval(bindings); } } return ExprEval.of(null); }
Source:
public void newTagPage(String tagName, MarkedText about){ if(!validator.validateCreationWithTag(tagName)) return; Tag tag = tags.findBySluggedName(tagName); TagPage tagPage = new TagPage(tag, about); if(!validator.validate(tagPage)){ validator.onErrorRedirectTo(TagPageController.class).tagPageForm(tagPage.getTag().getUriName()); return; } tagPages.save(tagPage); result.redirectTo(this).showTagPage(tagPage.getTag().getUriName()); }

Target:
public void newTagPage(String tagName, MarkedText about){ if(!validator.validateCreationWithTag(tagName)) return; Tag tag = tags.findByUriName(tagName); TagPage tagPage = new TagPage(tag, about); if(!validator.validate(tagPage)){ validator.onErrorRedirectTo(TagPageController.class).tagPageForm(tagPage.getTagUriName()); return; } tagPages.save(tagPage); result.redirectTo(this).showTagPage(tagPage.getTagUriName()); }
Source:
public ByteBuf getChunk(int length) throws IOException { if (file == null || length == 0) { return EMPTY_BUFFER; } if (fileChannel == null) { RandomAccessFile accessFile = new RandomAccessFile(file, "r"); fileChannel = accessFile.getChannel(); } int read = 0; ByteBuffer byteBuffer = ByteBuffer.allocate(length); while (read < length) { int readnow=-1; try { readnow = fileChannel.read(byteBuffer); }catch (IOException e){ logger.warn("Failed to read a file.", e); } finally { fileChannel.close(); } if (readnow == -1) { fileChannel.close(); fileChannel = null; break; } else { read += readnow; } } if (read == 0) { return EMPTY_BUFFER; } byteBuffer.flip(); ByteBuf buffer = wrappedBuffer(byteBuffer); buffer.readerIndex(0); buffer.writerIndex(read); return buffer; }

Target:
public ByteBuf getChunk(int length) throws IOException { if (file == null || length == 0) { return EMPTY_BUFFER; } if (fileChannel == null) { RandomAccessFile accessFile = new RandomAccessFile(file, "r"); fileChannel = accessFile.getChannel(); } int read = 0; ByteBuffer byteBuffer = ByteBuffer.allocate(length); try { while (read < length) { int readnow = fileChannel.read(byteBuffer); if (readnow == -1) { break; } read += readnow; } } finally { fileChannel.close(); fileChannel = null; } if (read == 0) { return EMPTY_BUFFER; } byteBuffer.flip(); ByteBuf buffer = wrappedBuffer(byteBuffer); buffer.readerIndex(0); buffer.writerIndex(read); return buffer; }
Source:
private void doAddReviewer() { final String nameEmail = addMemberBox.getText(); if (nameEmail.length() == 0) { return; } addMemberBox.setEnabled(false); final List<String> reviewers = Arrays.asList(nameEmail.split(";")); PatchUtil.DETAIL_SVC.addReviewers(changeId, reviewers, new GerritCallback<VoidResult>() { public void onSuccess(final VoidResult result) { addMemberBox.setEnabled(true); addMemberBox.setText(""); } @Override public void onFailure(final Throwable caught) { addMemberBox.setEnabled(true); super.onFailure(caught); } }); }

Target:
private void doAddReviewer() { final List<String> reviewers = addMemberBox.getNamesOrEmails(); if( reviewers == null || reviewers.size() == 0 ) { return; } addMemberBox.setEnabled(false); PatchUtil.DETAIL_SVC.addReviewers(changeId, reviewers, new GerritCallback<VoidResult>() { public void onSuccess(final VoidResult result) { addMemberBox.setEnabled(true); addMemberBox.setText(""); } @Override public void onFailure(final Throwable caught) { addMemberBox.setEnabled(true); super.onFailure(caught); } }); }
Source:
private void log(String tag, String message, String additionalMessage, LogLevel logLevel, ADALError errorCode, Throwable throwable) { if (logLevel.compareTo(mLogLevel) > 0) { return; } final StringBuilder logMessage = new StringBuilder(); if (errorCode != null) { logMessage.append(getCodeName(errorCode)).append(':'); } if (message != null) { logMessage.append(' ').append(addMoreInfo(message)); } if (throwable != null) { logMessage.append(' ').append(Log.getStackTraceString(throwable)); } if (additionalMessage != null && mEnablePII) { logMessage.append(' ').append(additionalMessage); } if (mLogcatLogEnabled) { sendLogcatLogs(tag, logLevel, logMessage.toString()); } if (mExternalLogger.get() != null) { try { mExternalLogger.get().Log(tag, message, "", logLevel, errorCode); } catch (Exception e) { Log.w(tag, String.format(CUSTOM_LOG_ERROR, message)); } } }

Target:
private void log(String tag, String message, String additionalMessage, LogLevel logLevel, ADALError errorCode, Throwable throwable) { if (logLevel.compareTo(mLogLevel) > 0) { return; } final StringBuilder logMessage = new StringBuilder(); if (errorCode != null) { logMessage.append(getCodeName(errorCode)).append(':'); } logMessage.append(addMoreInfo(message)); if (!StringExtensions.isNullOrBlank(additionalMessage) && mEnablePII) { logMessage.append(' ').append(additionalMessage); } if (throwable != null) { logMessage.append('\n').append(Log.getStackTraceString(throwable)); } if (mAndroidLogEnabled) { sendLogcatLogs(tag, logLevel, logMessage.toString()); } if (mExternalLogger != null) { try { if (!StringExtensions.isNullOrBlank(additionalMessage) && mEnablePII) { mExternalLogger.Log(tag, addMoreInfo(message), additionalMessage + (throwable == null ? "" : Log.getStackTraceString(throwable)), logLevel, errorCode); } else { mExternalLogger.Log(tag, addMoreInfo(message), throwable == null ? null : Log.getStackTraceString(throwable), logLevel, errorCode); } } catch (Exception e) { Log.w(tag, String.format(CUSTOM_LOG_ERROR, message)); } } }
Source:
public boolean match(final ChangeData object) throws OrmException { for (PatchLineComment c : object.comments()) { if (c.getStatus() == PatchLineComment.Status.DRAFT && c.getAuthor().equals(accountId)) { return true; } } return false; }

Target:
public boolean match(final ChangeData object) throws OrmException { if (!args.plcUtil .draftByChangeAuthor(args.db.get(), object.notes(), accountId) .isEmpty()) { return true; } return false; }
Source:
void complete(BitmapHunter hunter) { Action single = hunter.getAction(); List<Action> joined = hunter.getActions(); boolean hasMultiple = joined != null && !joined.isEmpty(); boolean shouldDeliver = single != null || hasMultiple; if (!shouldDeliver) { return; } Uri uri = hunter.getData().uri; Exception exception = hunter.getException(); Bitmap result = hunter.getResult(); LoadedFrom from = hunter.getLoadedFrom(); if (single != null) { deliverAction(result, from, single); if (!hasMultiple) { return; } } for (int i = 0, n = joined.size(); i < n; i++) { Action join = joined.get(i); deliverAction(result, from, join); } if (listener != null && exception != null) { listener.onImageLoadFailed(this, uri, exception); } }

Target:
void complete(BitmapHunter hunter) { Action single = hunter.getAction(); List<Action> joined = hunter.getActions(); boolean hasMultiple = joined != null && !joined.isEmpty(); boolean shouldDeliver = single != null || hasMultiple; if (!shouldDeliver) { return; } Uri uri = hunter.getData().uri; Exception exception = hunter.getException(); Bitmap result = hunter.getResult(); LoadedFrom from = hunter.getLoadedFrom(); if (single != null) { deliverAction(result, from, single); } if (hasMultiple) { for (int i = 0, n = joined.size(); i < n; i++) { Action join = joined.get(i); deliverAction(result, from, join); } } if (listener != null && exception != null) { listener.onImageLoadFailed(this, uri, exception); } }
Source:
void streamsReturnedByProvidersAreClosedWhenCallingProvide() { ExtensionContext extensionContext = getExtensionContextReturningSingleMethod( new TestCaseWithArgumentSourceAnnotatedMethod()); Stream<TestTemplateInvocationContext> stream = this.parameterizedTestExtension.provideTestTemplateInvocationContexts( extensionContext); long unused = stream.count(); assertTrue(streamWasClosed); }

Target:
void streamsReturnedByProvidersAreClosedWhenCallingProvide() { ExtensionContext extensionContext = getExtensionContextReturningSingleMethod( new TestCaseWithArgumentSourceAnnotatedMethod()); Stream<TestTemplateInvocationContext> stream = this.parameterizedTestExtension.provideTestTemplateInvocationContexts( extensionContext); stream.count(); assertTrue(streamWasClosed); }
Source:
public void onUpdate() { getPlayer().getWorld().spawnParticle(Particle.PORTAL, getPlayer().getLocation().add(0, 1, 0), 3, 0.2D, 0.01D, 0.2D); }

Target:
public void onUpdate() { Particles.PORTAL.display(0.2F, 0.01F, 0.02F, 0, 3, getPlayer().getLocation().add(0, 1, 0), 128); }
Source:
protected void init() { if (ds != null) { addFields(); addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { updateField((String) ((WideComboBox) e.getSource()) .getSelectedItem()); } }); String field = getLegend().getLookupFieldName(); if (field != null && !field.isEmpty()) { setSelectedItem(field); } updateField((String) getSelectedItem()); } else { LOGGER.error("Cannot construct the field combo box because the " + "DataSource is null."); } }

Target:
protected void init() { addFields(); addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { updateField((String) ((WideComboBox) e.getSource()) .getSelectedItem()); } }); String field = getLegend().getLookupFieldName(); if (field != null && !field.isEmpty()) { setSelectedItem(field); } updateField((String) getSelectedItem()); }
Source:
public static BranchEntity fromEntity(Entity e) { if (!e.getKind().equals(KIND) || e.getKey().getName() == null) { logger.log(Level.WARNING, "Missing test attributes in entity: " + e.toString()); return null; } String branchName = e.getKey().getName(); return new BranchEntity(branchName); }

Target:
public static BranchEntity fromEntity(Entity e) { if (!e.getKind().equals(KIND) || e.getKey().getName() == null) { logger.log(Level.WARNING, "Missing branch attributes in entity: " + e.toString()); return null; } String branchName = e.getKey().getName(); return new BranchEntity(branchName); }
Source:
protected int getObjectId() { return 60; }

Target:
protected int getObjectId() { return SpawnObjectMessage.ARROW; }
Source:
public MessageWithMetadata unwrapContent(byte[] data) { BinaryDecoder binaryDecoder = DecoderFactory.get().binaryDecoder(data, null); try { return new MessageWithMetadata( new MessageMetadata(binaryDecoder.readLong(), binaryDecoder.readString()), binaryDecoder.readBytes(null).array()); } catch (IOException exception) { throw new UnwrappingException("Could not read hermes avro message", exception); } }

Target:
public UnwrappedMessageContent unwrapContent(byte[] data) { BinaryDecoder binaryDecoder = DecoderFactory.get().binaryDecoder(data, null); try { return new UnwrappedMessageContent( new MessageMetadata(binaryDecoder.readLong(), binaryDecoder.readString()), binaryDecoder.readBytes(null).array()); } catch (IOException exception) { throw new UnwrappingException("Could not read hermes avro message", exception); } }
Source:
public Result call() { if (transactionTemplate != null) { return transactionTemplate.execute((status) -> doCallInTransaction()); } else { return doCallInTransaction(); } }

Target:
public Result call() { final SecurityContext originalContext = SecurityContextHolder.getContext(); try { SecurityContextHolder.setContext(SecurityContextHolder.createEmptyContext()); SecurityContextHolder.getContext().setAuthentication(authentication); return authenticatedCall(); } finally { SecurityContextHolder.setContext(originalContext); } }
Source:
public Result getMostRecentMessage(String userId) { UserSession session = getAuthenticatedSession(Roles.ADMIN); Study study = studyService.getStudy(session.getStudyIdentifier()); SmsMessage message = smsService.getMostRecentMessage(study, userId); return okResult(message); }

Target:
public Result getMostRecentMessage(String userId) { UserSession session = getAuthenticatedSession(Roles.ADMIN); Study study = studyService.getStudy(session.getStudyIdentifier()); StudyParticipant participant = participantService.getParticipant(study, userId, false); if (participant.getPhone() == null) { throw new BadRequestException("participant has no phone number"); } SmsMessage message = smsService.getMostRecentMessage(participant.getPhone().getNumber()); return okResult(message); }
Source:
public void buttonContinueOpensProjectActivity() throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException, InvocationTargetException, IllegalAccessException { onView(withId(R.id.main_menu_button_continue)) .perform(click()); onView(withId(R.id.fragment_sprites_list)) .check(matches(isDisplayed())); }

Target:
public void buttonContinueOpensProjectActivity() { onView(withId(R.id.main_menu_button_continue)) .perform(click()); onView(withId(R.id.fragment_sprites_list)) .check(matches(isDisplayed())); }
Source:
private int readAllNulls(int[] positions, int positionCount) throws IOException { if (nonDeterministicFilter) { outputPositionCount = 0; for (int i = 0; i < positionCount; i++) { if (filter.testNull()) { outputPositionCount++; } else { outputPositionCount -= filter.getPrecedingPositionsToFail(); i += filter.getSucceedingPositionsToFail(); } } } else if (nullsAllowed) { outputPositionCount = positionCount; } else { outputPositionCount = 0; } allNulls = true; return positions[positionCount - 1] + 1; }

Target:
private int readAllNulls(int[] positions, int positionCount) { if (nonDeterministicFilter) { outputPositionCount = 0; for (int i = 0; i < positionCount; i++) { if (filter.testNull()) { outputPositionCount++; } else { outputPositionCount -= filter.getPrecedingPositionsToFail(); i += filter.getSucceedingPositionsToFail(); } } } else if (nullsAllowed) { outputPositionCount = positionCount; } else { outputPositionCount = 0; } allNulls = true; return positions[positionCount - 1] + 1; }
Source:
private ValuesReader readPageV1(DataPageV1 page) { ValuesReader rlReader = page.getRepetitionLevelEncoding().getValuesReader(columnDescriptor, REPETITION_LEVEL); ValuesReader dlReader = page.getDefinitionLevelEncoding().getValuesReader(columnDescriptor, DEFINITION_LEVEL); repetitionReader = new LevelValuesReader(rlReader); definitionReader = new LevelValuesReader(dlReader); try { byte[] bytes = page.getSlice().getBytes(); final ByteBufferInputStream bufferInputStream = ByteBufferInputStream.wrap(ByteBuffer.wrap(bytes)); rlReader.initFromPage(page.getValueCount(), bufferInputStream); int offset = bytes.length - bufferInputStream.available(); final ByteBufferInputStream dlbyteBufferInputStream = ByteBufferInputStream.wrap(ByteBuffer.wrap(bytes, offset, bytes.length - offset)); dlReader.initFromPage(page.getValueCount(), dlbyteBufferInputStream); offset = bytes.length - dlbyteBufferInputStream.available(); return initDataReader(page.getValueEncoding(), ByteBufferInputStream.wrap(ByteBuffer.wrap(bytes, offset, bytes.length - offset)), page.getValueCount()); } catch (IOException e) { throw new ParquetDecodingException("Error reading parquet page " + page + " in column " + columnDescriptor, e); } }

Target:
private ValuesReader readPageV1(DataPageV1 page) { ValuesReader repetitionLevelReader = page.getRepetitionLevelEncoding().getValuesReader(columnDescriptor, REPETITION_LEVEL); ValuesReader definitionLevelReader = page.getDefinitionLevelEncoding().getValuesReader(columnDescriptor, DEFINITION_LEVEL); repetitionReader = new LevelValuesReader(repetitionLevelReader); definitionReader = new LevelValuesReader(definitionLevelReader); try { byte[] bytes = page.getSlice().getBytes(); ByteBufferInputStream bufferInputStream = ByteBufferInputStream.wrap(ImmutableList.of(ByteBuffer.wrap(bytes))); repetitionLevelReader.initFromPage(page.getValueCount(), bufferInputStream); int offset = bytes.length - bufferInputStream.available(); ByteBuffer definitionLevelByteBuffer = ByteBuffer.wrap(bytes, offset, bytes.length - offset); ByteBufferInputStream definitionLevelInputStream = ByteBufferInputStream.wrap(ImmutableList.of(definitionLevelByteBuffer)); definitionLevelReader.initFromPage(page.getValueCount(), definitionLevelInputStream); offset = bytes.length - definitionLevelInputStream.available(); ByteBuffer byteBuffer = ByteBuffer.wrap(bytes, offset, bytes.length - offset); return initDataReader(page.getValueEncoding(), ByteBufferInputStream.wrap(ImmutableList.of(byteBuffer)), page.getValueCount()); } catch (IOException e) { throw new ParquetDecodingException("Error reading parquet page " + page + " in column " + columnDescriptor, e); } }
Source:
private void watchLogsIfDebugEnabled(Map<String, String> startOptions) throws InfrastructureException { if (LogWatcher.shouldWatchLogs(startOptions)) { logWatcherMetrics.workspaceStartedInStartDebugMode(); LOG.info( "Debug workspace startup. Will watch the logs of '{}'", getContext().getIdentity().getWorkspaceId()); Set<String> podNames = machines .getMachines(getContext().getIdentity()) .values() .stream() .filter(Objects::nonNull) .map(KubernetesMachineImpl::getPodName) .filter(Objects::nonNull) .collect(Collectors.toSet()); LOG.debug( "Watch '{}' pods in workspace '{}'", podNames, getContext().getIdentity().getWorkspaceId()); namespace .deployments() .watchLogs( new PodLogToEventPublisher(this.eventPublisher, this.getContext().getIdentity()), LogWatchTimeouts.DEFAULT, podNames, LogWatcher.getLogLimitBytes(startOptions)); } }

Target:
private void watchLogsIfDebugEnabled(Map<String, String> startOptions) throws InfrastructureException { if (LogWatcher.shouldWatchLogs(startOptions)) { LOG.info( "Debug workspace startup. Will watch the logs of '{}'", getContext().getIdentity().getWorkspaceId()); Set<String> podNames = machines .getMachines(getContext().getIdentity()) .values() .stream() .filter(Objects::nonNull) .map(KubernetesMachineImpl::getPodName) .filter(Objects::nonNull) .collect(Collectors.toSet()); LOG.debug( "Watch '{}' pods in workspace '{}'", podNames, getContext().getIdentity().getWorkspaceId()); namespace .deployments() .watchLogs( new PodLogToEventPublisher(this.eventPublisher, this.getContext().getIdentity()), LogWatchTimeouts.DEFAULT, podNames, LogWatcher.getLogLimitBytes(startOptions)); } }
Source:
public GetBulkResult call() throws Exception { final Ds3ClientHelpers.ObjectChannelBuilder getter; if (checksum) { throw new RuntimeException("Checksumming is currently not implemented."); } else { getter = new FileObjectGetter(this.outputPath); } if (sync) { if (this.prefix == null) { LOG.info("Syncing all objects from " + this.bucketName); } else { LOG.info("Syncing only those objects that start with " + this.prefix); } return new GetBulkResult(restoreSome(getter)); } if (this.prefix == null) { LOG.info("Getting all objects from " + this.bucketName); return new GetBulkResult(restoreAll(getter)); } LOG.info("Getting only those objects that start with " + this.prefix); return new GetBulkResult(restoreSome(getter)); }

Target:
public GetBulkResult call() throws Exception { final Ds3ClientHelpers.ObjectChannelBuilder getter; if (checksum) { throw new RuntimeException("Checksumming is currently not implemented."); } else { getter = new FileObjectGetter(this.outputPath); } if (sync) { if (this.prefix == null || this.prefix.isEmpty()) { LOG.info("Syncing all objects from " + this.bucketName); } else { LOG.info("Syncing only those objects that start with " + this.prefix); } return new GetBulkResult(restoreSome(getter)); } if (this.prefix == null) { LOG.info("Getting all objects from " + this.bucketName); return new GetBulkResult(restoreAll(getter)); } LOG.info("Getting only those objects that start with " + this.prefix); return new GetBulkResult(restoreSome(getter)); }
Source:
public static NearestMatchFinder get(ResourceInfo info, DimensionInfo dimensionInfo, String dimensionName) throws IOException { Class dataType = getDataTypeFromDimension(info, dimensionName); try { AcceptableRange acceptableRange = AcceptableRange.getAcceptableRange(dimensionInfo.getAcceptableInterval (), dataType); if (info instanceof FeatureTypeInfo) { FeatureTypeInfo featureType = (FeatureTypeInfo) info; return new Vector(featureType, dimensionInfo.getAttribute(), dimensionInfo.getEndAttribute(), acceptableRange, dataType); } else if (info instanceof CoverageInfo) { GridCoverageReader reader = ((CoverageInfo) info).getGridCoverageReader(null, null); if (reader instanceof StructuredGridCoverage2DReader && ENABLE_STRUCTURED_READER_SUPPORT) { StructuredGridCoverage2DReader structured = (StructuredGridCoverage2DReader) reader; DimensionDescriptor dd = getDimensionDescriptor(structured, dimensionName); return new StructuredReader(structured, dd.getStartAttribute(), dd.getEndAttribute(), acceptableRange, dataType); } else if (reader instanceof GridCoverage2DReader) { return new Reader((GridCoverage2DReader) reader, acceptableRange, dimensionName, dataType); } } } catch (ParseException e) { throw new ServiceException("Failed to apply nearest match search", e); } throw new IllegalArgumentException("No nearest match support for " + info); }

Target:
public static NearestMatchFinder get(ResourceInfo info, DimensionInfo dimensionInfo, String dimensionName) throws IOException { Class dataType = getDataTypeFromDimension(info, dimensionName); try { AcceptableRange acceptableRange = AcceptableRange.getAcceptableRange(dimensionInfo.getAcceptableInterval (), dataType); if (info instanceof FeatureTypeInfo) { FeatureTypeInfo featureType = (FeatureTypeInfo) info; return new Vector(featureType, dimensionInfo.getAttribute(), dimensionInfo.getEndAttribute(), acceptableRange, dataType); } else if (info instanceof CoverageInfo) { GridCoverageReader reader = ((CoverageInfo) info).getGridCoverageReader(null, null); if (reader instanceof StructuredGridCoverage2DReader && ENABLE_STRUCTURED_READER_SUPPORT) { StructuredGridCoverage2DReader structured = (StructuredGridCoverage2DReader) reader; DimensionDescriptor dd = getDimensionDescriptor(structured, dimensionName); return new StructuredReader(structured, dd.getStartAttribute(), dd.getEndAttribute(), acceptableRange, dataType); } else if (reader instanceof GridCoverage2DReader) { return new Reader((GridCoverage2DReader) reader, acceptableRange, dimensionName, dataType); } } } catch (ParseException e) { throw new ServiceException("Failed to apply nearest match search on " + info.prefixedName(), e); } throw new IllegalArgumentException("No nearest match support for " + info); }
Source:
private IPFSClient ipfs() { IPFSClient client = getComponent().getIPFSClient(); if (!client.hasConnection()) client.connect(); return client; }

Target:
private IPFSClient ipfs() { if (!client.hasConnection()) { client.connect(); } return client; }
Source:
public CorfuLogReplicationRuntime(LogReplicationRuntimeParameters parameters, LogReplicationMetadataManager metadataManager) { this.remoteClusterId = parameters.getRemoteClusterDescriptor().getClusterId(); this.metadataManager = metadataManager; this.router = new LogReplicationClientRouter(parameters, this); this.router.addClient(new LogReplicationHandler()); this.sourceManager = new LogReplicationSourceManager(parameters, new LogReplicationClient(router, remoteClusterId), metadataManager); this.connectedEndpoints = new HashSet<>(); this.communicationFSMWorkers = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>()); this.communicationFSMConsumer = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("runtime-fsm-consumer").build()); initializeStates(); this.state = states.get(LogReplicationRuntimeStateType.WAITING_FOR_CONNECTIVITY); log.info("Log Replication Runtime State Machine initialized"); }

Target:
public CorfuLogReplicationRuntime(LogReplicationRuntimeParameters parameters, LogReplicationMetadataManager metadataManager) { this.remoteClusterId = parameters.getRemoteClusterDescriptor().getClusterId(); this.metadataManager = metadataManager; this.router = new LogReplicationClientRouter(parameters, this); this.router.addClient(new LogReplicationHandler()); this.sourceManager = new LogReplicationSourceManager(parameters, new LogReplicationClient(router, remoteClusterId), metadataManager); this.connectedEndpoints = new HashSet<>(); ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("runtime-fsm-worker").build(); this.communicationFSMWorkers = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory); this.communicationFSMConsumer = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("runtime-fsm-consumer").build()); initializeStates(); this.state = states.get(LogReplicationRuntimeStateType.WAITING_FOR_CONNECTIVITY); log.info("Log Replication Runtime State Machine initialized"); }
Source:
public final void addInternalTopic(final String topicName, final InternalTopicProperties internalTopicProperties) { addInternalTopic(topicName); if (internalTopicProperties != null) { internalTopicNamesWithProperties.put(topicName, internalTopicProperties); } }

Target:
public final void addInternalTopic(final String topicName, final InternalTopicProperties internalTopicProperties) { Objects.requireNonNull(topicName, "topicName can't be null"); Objects.requireNonNull(internalTopicProperties, "internalTopicProperties can't be null"); internalTopicNamesWithProperties.put(topicName, internalTopicProperties); }
Source:
public void doGC() { BlobProvider bp = getBlobProvider(); BinaryGarbageCollector gc = bp.getBinaryManager().getGarbageCollector(); gc.start(); keyStream().map(this::getBlobKeys) .flatMap(Collection::stream) .forEach(gc::mark); gc.stop(true); computeStorageSize(); }

Target:
public void doGC() { BlobProvider bp = getBlobProvider(); BinaryGarbageCollector gc = bp.getBinaryManager().getGarbageCollector(); boolean delete = false; gc.start(); try { keyStream().map(this::getBlobKeys) .flatMap(Collection::stream) .forEach(gc::mark); delete = true; } finally { gc.stop(delete); } computeStorageSize(); }
Source:
public void setup(TestContext testContext) throws Exception { if (writePercentage < 0) { throw new IllegalArgumentException("Write percentage can't be smaller than 0"); } if (writePercentage > 100) { throw new IllegalArgumentException("Write percentage can't be larger than 100"); } this.testContext = testContext; targetInstance = testContext.getTargetInstance(); CacheManager cacheManager; if (TestUtils.isMemberNode(targetInstance)) { HazelcastServerCachingProvider hcp = new HazelcastServerCachingProvider(); cacheManager = new HazelcastServerCacheManager( hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } else { HazelcastClientCachingProvider hcp = new HazelcastClientCachingProvider(); cacheManager = new HazelcastClientCacheManager( hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } CacheConfig<Integer, Integer> config = new CacheConfig<Integer, Integer>(); config.setName(basename); try { cacheManager.createCache(basename, config); } catch (CacheException hack) { log.severe(hack); } cache = (ICache<Object, Object>) cacheManager.getCache(basename); selector.addOperation(Operation.PUT, ((double)writePercentage) / 100) .empty(Operation.GET); }

Target:
public void setup(TestContext testContext) throws Exception { this.testContext = testContext; targetInstance = testContext.getTargetInstance(); CacheManager cacheManager; if (TestUtils.isMemberNode(targetInstance)) { HazelcastServerCachingProvider hcp = new HazelcastServerCachingProvider(); cacheManager = new HazelcastServerCacheManager( hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } else { HazelcastClientCachingProvider hcp = new HazelcastClientCachingProvider(); cacheManager = new HazelcastClientCacheManager( hcp, targetInstance, hcp.getDefaultURI(), hcp.getDefaultClassLoader(), null); } CacheConfig<Integer, Integer> config = new CacheConfig<Integer, Integer>(); config.setName(basename); try { cacheManager.createCache(basename, config); } catch (CacheException hack) { log.severe(hack); } cache = (ICache<Object, Object>) cacheManager.getCache(basename); selector.addOperation(Operation.PUT, writeProbability) .empty(Operation.GET); }
Source:
private boolean searchValue(Object value, CloseableIteratorSet<Map.Entry<K, V>> iterator, Function<K, MetadataValue<V>> remoteValueSupplier) { try (CloseableIterator<Map.Entry<K, V>> it = iterator.iterator()) { while (it.hasNext()) { Map.Entry<K, V> entry = it.next(); if (!entries.containsKey(wrap(entry.getKey())) && Objects.deepEquals(entry.getValue(), value)) { ByRef<Boolean> result = new ByRef<>(false); entries.computeIfAbsent(wrap(entry.getKey()), wrappedKey -> { MetadataValue<V> remoteValue = remoteValueSupplier.apply(wrappedKey.key); if (Objects.deepEquals(remoteValue.getValue(), value)) { result.set(true); return TransactionEntry.read(wrappedKey.key, remoteValue); } else { return null; } }); if (result.get()) { return true; } } } } return false; }

Target:
private boolean searchValue(Object value, CloseableIteratorSet<Map.Entry<K, V>> iterator, Function<K, MetadataValue<V>> remoteValueSupplier) { try (CloseableIterator<Map.Entry<K, V>> it = iterator.iterator()) { while (it.hasNext()) { Map.Entry<K, V> entry = it.next(); if (!entries.containsKey(wrap(entry.getKey())) && Objects.deepEquals(entry.getValue(), value)) { ByRef.Boolean result = new ByRef.Boolean(false); entries.computeIfAbsent(wrap(entry.getKey()), wrappedKey -> { MetadataValue<V> remoteValue = remoteValueSupplier.apply(wrappedKey.key); if (Objects.deepEquals(remoteValue.getValue(), value)) { result.set(true); return TransactionEntry.read(wrappedKey.key, remoteValue); } else { return null; } }); if (result.get()) { return true; } } } } return false; }
Source:
public void start() { try { this.scheduler.start(); } catch (final SchedulerException e) { logger.warn("Error starting Quartz scheduler: ", e); } logger.info("Quartz Scheduler started."); }

Target:
public void start() { try { this.scheduler.start(); } catch (final SchedulerException e) { logger.error("Error starting Quartz scheduler: ", e); } logger.info("Quartz Scheduler started."); }
Source:
private static Optional<Node> getChildElementByName(String name, List<Node> children) { for (Node child : children) { if (child.getNodeType() == Node.ELEMENT_NODE && ((Element) child).getTagName().equals(name)) { return Optional.of(child); } } return Optional.empty(); }

Target:
private static Optional<Element> getChildElementByName(String name, List<Node> children) { return children.stream() .filter(child -> child.getNodeType() == Node.ELEMENT_NODE) .map(Element.class::cast) .filter(element -> element.getTagName().equals(name)) .findFirst(); }
Source:
private int read(WritableByteChannel channel) throws IOException { int waitTime = 0; int bytesRead; while (true) { bytesRead = readableStreamChannel.read(channel); if (bytesRead == 0) { try { Thread.sleep(10); waitTime += 10; logger.warn("ReadableStreamChannelInputStream has been waiting for " + waitTime + "ms for data"); } catch (InterruptedException e) { throw new IOException("Wait for data interrupted", e); } } else { break; } } return bytesRead; }

Target:
private int read(WritableByteChannel channel) throws IOException { int SINGLE_WAIT_TIME = 10; int WARN_INTERVAL = 50; int totalWaitTime = 0; int bytesRead; while (true) { bytesRead = readableStreamChannel.read(channel); if (bytesRead == 0) { try { Thread.sleep(SINGLE_WAIT_TIME); totalWaitTime += SINGLE_WAIT_TIME; if (totalWaitTime % WARN_INTERVAL == 0) { logger.warn("ReadableStreamChannelInputStream has been waiting for " + totalWaitTime + "ms for data"); } } catch (InterruptedException e) { throw new IOException("Wait for data interrupted", e); } } else { break; } } return bytesRead; }
Source:
private ProcessDefinition findDefinitionByName(String name) throws ReflectiveOperationException { Class clazz; try { clazz = Class.forName(name); } catch (ClassNotFoundException ex) { clazz = processDefinitions.stream().map(Object::getClass).filter(c -> c.getName().equals(name)).findFirst().orElseThrow(() -> ex); } final Class defClass = clazz; ProcessDefinition definition = (ProcessDefinition) defClass.newInstance(); processDefinitions.stream().filter(d -> d.getClass().equals(defClass)).findFirst().ifPresent(svc -> copyReferences(svc, definition)); return definition; }

Target:
private ProcessDefinition findDefinitionByName(String name) throws ReflectiveOperationException { ProcessDefinitionFactory factory = processDefinitionFactories.stream(). filter(f -> name.equals(f.getName())).findFirst() .orElseThrow(()->new IllegalArgumentException("Unable to find process " + name)); return factory.createProcessDefinition(); }
Source:
public void wrongValueTypeThrowsException() throws IllegalAccessException, InstantiationException, LegalSPITesterException { kvStore2 = factory.newStore(); K key = factory.createKey(1); try { if (this.factory.getValueType() == String.class) { kvStore2.putIfAbsent(key, 1.0f); } else { kvStore2.putIfAbsent(key, "value"); } throw new AssertionError("Expected ClassCastException because the value is of the wrong type"); } catch (CacheAccessException cae) { assertThat(cae.getCause(), instanceOf(ClassCastException.class)); throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test"); } }

Target:
public void wrongValueTypeThrowsException() throws IllegalAccessException, InstantiationException, LegalSPITesterException { kvStore2 = factory.newStore(); K key = factory.createKey(1); try { if (this.factory.getValueType() == String.class) { kvStore2.putIfAbsent(key, 1.0f); } else { kvStore2.putIfAbsent(key, "value"); } throw new AssertionError("Expected ClassCastException because the value is of the wrong type"); } catch (ClassCastException e) { } catch (CacheAccessException e) { throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test"); } }
Source:
private int getEstimatedColumnSizeInBytes(DataSchema.ColumnDataType dataType) { if (dataType.isNumber()) { switch (dataType) { case LONG: return Long.BYTES; case FLOAT: return Float.BYTES; case DOUBLE: return Double.BYTES; case INT: default: return Integer.BYTES; } } else { return pinotConfig.getEstimatedSizeInBytesForNonNumericColumn(); } }

Target:
private int getEstimatedColumnSizeInBytes(DataSchema.ColumnDataType dataType) { if (dataType.isNumber()) { switch (dataType) { case LONG: return Long.BYTES; case FLOAT: return Float.BYTES; case DOUBLE: return Double.BYTES; case INT: default: return Integer.BYTES; } } return pinotConfig.getEstimatedSizeInBytesForNonNumericColumn(); }
Source:
private void desanitizeAndUpdateProfile(StudentProfileAttributes profile) throws InvalidParametersException, EntityDoesNotExistException { profile.shortName = desanitizeIfHtmlSanitized(profile.shortName); profile.email = desanitizeIfHtmlSanitized(profile.email); profile.institute = desanitizeIfHtmlSanitized(profile.institute); profile.nationality = desanitizeIfHtmlSanitized(profile.nationality); profile.gender = GenderType.valueOf(desanitizeIfHtmlSanitized(profile.gender.toString())); profile.moreInfo = desanitizeIfHtmlSanitized(profile.moreInfo); if (!profile.isValid()) { throw new InvalidParametersException(profile.getInvalidityInfo()); } if (isPreview) { return; } profilesLogic.updateStudentProfile(profile); }

Target:
private void desanitizeAndUpdateProfile(StudentProfileAttributes profile) throws InvalidParametersException, EntityDoesNotExistException { profile.shortName = desanitizeIfHtmlSanitized(profile.shortName); profile.email = desanitizeIfHtmlSanitized(profile.email); profile.institute = desanitizeIfHtmlSanitized(profile.institute); profile.nationality = desanitizeIfHtmlSanitized(profile.nationality); profile.moreInfo = desanitizeIfHtmlSanitized(profile.moreInfo); if (!profile.isValid()) { throw new InvalidParametersException(profile.getInvalidityInfo()); } if (isPreview) { return; } profilesLogic.updateStudentProfile(profile); }
Source:
private RangePartitionFunc(@Parameter(PartitionSizeBits.class) final int partitionSizeBits) { if (partitionSizeBits <= 0 || partitionSizeBits > 32) { throw new RuntimeException("PartitionSizeBits should be positive value and its maximum value is 32"); } this.partitionSizeBits = partitionSizeBits; }

Target:
private RangePartitionFunc(@Parameter(PartitionSizeBits.class) final int partitionSizeBits) { if (partitionSizeBits <= 0 || partitionSizeBits > 32) { throw new RuntimeException("PartitionSizeBits should be a positive value no greater than 32"); } this.partitionSizeBits = partitionSizeBits; }
Source:
private Metadata getMetadata(String owner, String sequenceNumber, String offset) { Metadata metadata = new Metadata(); metadata.put("ownerId", owner); metadata.put("sequenceNumber", sequenceNumber); metadata.put("offset", offset); return metadata; }

Target:
private Metadata getMetadata(String owner, String sequenceNumber, String offset) { Metadata metadata = new Metadata(); metadata.put("OwnerId", owner); metadata.put("SequenceNumber", sequenceNumber); metadata.put("Offset", offset); return metadata; }
Source:
public String getEntryTitle(Run entry) { return entry.getFullDisplayName(); }

Target:
public String getEntryTitle(Run entry) { return entry.getFullDisplayName()+" ("+entry.getBuildStatusSummary().message+")"; }
Source:
protected GlusterGeoRepSessionDetails getSessionDetails(Map<String, Object> innerMap) { GlusterGeoRepSessionDetails details = super.getSessionDetails(innerMap); if (details != null) { Long filesSynced = innerMap.containsKey(FILES_SYNCED) ? Long.parseLong(innerMap.get(FILES_SYNCED).toString()) : null; Long filesPending = innerMap.containsKey(FILES_PENDING) ? Long.parseLong(innerMap.get(FILES_PENDING).toString()) : null; Long bytesPending = innerMap.containsKey(BYTES_PENDING) ? Long.parseLong(innerMap.get(BYTES_PENDING).toString()) : null; Long deletesPending = innerMap.containsKey(DELETES_PENDING) ? Long.parseLong(innerMap.get(DELETES_PENDING).toString()) : null; Long filesSkipped = innerMap.containsKey(FILES_SKIPPED) ? Long.parseLong(innerMap.get(FILES_SKIPPED).toString()) : null; details.setFilesPending(filesPending); details.setFilesSkipped(filesSkipped); details.setFilesSynced(filesSynced); details.setBytesPending(bytesPending); details.setDeletesPending(deletesPending); } return details; }

Target:
protected GlusterGeoRepSessionDetails getSessionDetails(Map<String, Object> innerMap) { GlusterGeoRepSessionDetails details = super.getSessionDetails(innerMap); if (details != null) { Long filesSynced = innerMap.containsKey(FILES_SYNCED) ? parseExceptionSafeLong(innerMap.get(FILES_SYNCED).toString()) : null; Long filesPending = innerMap.containsKey(FILES_PENDING) ? parseExceptionSafeLong(innerMap.get(FILES_PENDING).toString()) : null; Long bytesPending = innerMap.containsKey(BYTES_PENDING) ? parseExceptionSafeLong(innerMap.get(BYTES_PENDING).toString()) : null; Long deletesPending = innerMap.containsKey(DELETES_PENDING) ? parseExceptionSafeLong(innerMap.get(DELETES_PENDING).toString()) : null; Long filesSkipped = innerMap.containsKey(FILES_SKIPPED) ? parseExceptionSafeLong(innerMap.get(FILES_SKIPPED).toString()) : null; details.setFilesPending(filesPending); details.setFilesSkipped(filesSkipped); details.setFilesSynced(filesSynced); details.setBytesPending(bytesPending); details.setDeletesPending(deletesPending); } geoRepDetails.add(details); return details; }