auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void startMasters(boolean isLeader) { try { connectToUFS(); mRegistry.start(isLeader); } catch (IOException e) { LOG.error("Failed to start master.", e); throw Throwables.propagate(e); } }

Target:
protected void startMasters(boolean isLeader) { try { connectToUFS(); mRegistry.start(isLeader); } catch (IOException e) { throw new RuntimeException(e); } }
Source:
public static ListStatusPOptions getListStatusOptions() { FileSystemMasterCommonPOptions commonOptions = getCommonOptions().toBuilder().setTtl(Configuration.getMs(PropertyKey.USER_FILE_LOAD_TTL)) .setTtlAction(GrpcUtils.toProto( Configuration.getEnum(PropertyKey.USER_FILE_LOAD_TTL_ACTION, TtlAction.class))) .build(); return ListStatusPOptions.newBuilder().setCommonOptions(commonOptions) .setLoadMetadataType(GrpcUtils.toProto(Configuration .getEnum(PropertyKey.USER_FILE_METADATA_LOAD_TYPE, LoadMetadataType.class))) .build(); }

Target:
public static ListStatusPOptions getListStatusOptions() { return ListStatusPOptions.newBuilder() .setCommonOptions(getCommonOptions().toBuilder() .setTtl(Configuration.getMs(PropertyKey.USER_FILE_LOAD_TTL)) .setTtlAction(GrpcUtils.toProto( Configuration.getEnum(PropertyKey.USER_FILE_LOAD_TTL_ACTION, TtlAction.class)))) .setLoadMetadataType(GrpcUtils.toProto(Configuration .getEnum(PropertyKey.USER_FILE_METADATA_LOAD_TYPE, LoadMetadataType.class))) .build(); }
Source:
public String getTooltip(MergeMode mode) { String tooltip; switch (mode) { case LEFT_TO_RIGHT: tooltip = EMFCompareDiagramEditMessages.getString("merged.to.right.tooltip"); //$NON-NLS-1$ break; case RIGHT_TO_LEFT: tooltip = EMFCompareDiagramEditMessages.getString("merged.to.left.tooltip"); //$NON-NLS-1$ break; case ACCEPT: tooltip = EMFCompareDiagramEditMessages.getString("accept.change.tooltip"); //$NON-NLS-1$ break; case REJECT: tooltip = EMFCompareDiagramEditMessages.getString("reject.change.tooltip"); //$NON-NLS-1$ break; default: throw new IllegalStateException(); } return tooltip; }

Target:
public String getTooltip(MergeMode mode) throws IllegalArgumentException { String tooltip; switch (mode) { case LEFT_TO_RIGHT: tooltip = EMFCompareDiagramEditMessages.getString("merged.to.right.tooltip"); //$NON-NLS-1$ break; case RIGHT_TO_LEFT: tooltip = EMFCompareDiagramEditMessages.getString("merged.to.left.tooltip"); //$NON-NLS-1$ break; case ACCEPT: tooltip = EMFCompareDiagramEditMessages.getString("accept.change.tooltip"); //$NON-NLS-1$ break; case REJECT: tooltip = EMFCompareDiagramEditMessages.getString("reject.change.tooltip"); //$NON-NLS-1$ break; default: throw new IllegalArgumentException(); } return tooltip; }
Source:
public static Result deleteUser(Long userId) { if (User.findByLoginId(session().get("loginId")).isSiteManager()){ if (!Project.isOnlyManager(userId)) { User.find.byId(userId).delete(); } else { flash(Constants.WARNING, "site.userList.deleteAlert"); } } else { flash(Constants.WARNING, "auth.unauthorized.waringMessage"); } return redirect(routes.SiteApp.userList(0, null)); }

Target:
public static Result deleteUser(Long userId) { if (User.findByLoginId(session().get("loginId")).isSiteManager()){ if (Project.isOnlyManager(userId)) { flash(Constants.WARNING, "site.userList.deleteAlert"); } else { User.find.byId(userId).delete(); } } else { flash(Constants.WARNING, "auth.unauthorized.waringMessage"); } return redirect(routes.SiteApp.userList(0, null)); }
Source:
public Attachment(@NonNull Uri uri, @NonNull String contentType, long date, @Nullable String fileName) { if (date < 0) { throw new AssertionError("uri, content type, and date must all be specified"); } this.uri = uri; this.fileName = fileName; this.contentType = contentType; this.date = date; }

Target:
public Attachment(@NonNull Uri uri, @NonNull String contentType, long date, @Nullable String fileName) { if (uri == null || contentType == null || date < 0) { throw new AssertionError("uri, content type, and date must all be specified"); } this.uri = uri; this.fileName = fileName; this.contentType = contentType; this.date = date; }
Source:
public static @NonNull String getSpanName(String attributeName) { return attributeName.substring(0, attributeName.lastIndexOf('/')); }

Target:
private static @NonNull String getSpanName(String attributeName) { return attributeName.substring(0, attributeName.lastIndexOf('/')); }
Source:
private boolean isRealWorklog(final EveritWorklog worklog) { boolean isRealWorklog = true; if (issuesRegex != null) { for (final Pattern issuePattern : issuesRegex) { final boolean issueMatches = issuePattern.matcher(worklog.getIssue()).matches(); // if match not count in summary if (issueMatches) { isRealWorklog = false; break; } } } return isRealWorklog; }

Target:
private boolean isRealWorklog(final EveritWorklog worklog) { boolean isRealWorklog = true; if (issuesRegex != null) { for (Pattern issuePattern : issuesRegex) { boolean issueMatches = issuePattern.matcher(worklog.getIssue()).matches(); // if match not count in summary if (issueMatches) { isRealWorklog = false; break; } } } return isRealWorklog; }
Source:
protected Pageview() { }

Target:
private Pageview() { }
Source:
public void execute(final Talks talks) throws IOException { int idx = this.index(talks); for (final Talk talk : talks.active()) { final int current = idx + 1; talk.modify( new Directives() .xpath("/talk/request") .attr("index", Integer.toString(current)) ); idx = current; } }

Target:
public void execute(final Talks talks) throws IOException { int idx = this.index(talks); for (final Talk talk : talks.active()) { idx += 1; talk.modify( new Directives() .xpath("/talk/request") .attr("index", Integer.toString(idx)) ); } }
Source:
public long getSafePointDrId() { // Acquire lock to avoid seeing bad data while another thread is in truncate() synchronized (m_map) { assert (!m_map.isEmpty()); return end(m_map.asRanges().iterator().next()); } }

Target:
public long getSafePointDrId() { assert (!m_map.isEmpty()); return end(m_map.asRanges().iterator().next()); }
Source:
public double getFilterMinSelectivityEstimateFactor() { return options.getOption(FILTER_MIN_SELECTIVITY_ESTIMATE_FACTOR.getOptionName()).float_val; }

Target:
public double getFilterMinSelectivityEstimateFactor() { return options.getOption(FILTER_MIN_SELECTIVITY_ESTIMATE_FACTOR); }
Source:
public JavaOutputProcessor(PrettyPrinter printer) { this.printer = printer; this.environment = printer.getEnvironment(); }

Target:
public JavaOutputProcessor(PrettyPrinter printer) { this.printer = printer; }
Source:
public BucketFunction getBucketFunction( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List<Type> partitionChannelTypes, int bucketCount) { HivePartitioningHandle handle = (HivePartitioningHandle) partitioningHandle; BucketFunctionType bucketFunctionType = handle.getBucketFunctionType(); switch (bucketFunctionType) { case HIVE_COMPATIBLE: return createHiveCompatibleBucketFunction(bucketCount, handle.getHiveTypes().get()); case PRESTO_NATIVE: return createPrestoNativeBucketFunction(bucketCount, handle.getTypes().get()); default: throw new IllegalStateException("Unsupported bucket function type " + bucketFunctionType); } }

Target:
public BucketFunction getBucketFunction( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List<Type> partitionChannelTypes, int bucketCount) { HivePartitioningHandle handle = (HivePartitioningHandle) partitioningHandle; BucketFunctionType bucketFunctionType = handle.getBucketFunctionType(); switch (bucketFunctionType) { case HIVE_COMPATIBLE: return createHiveCompatibleBucketFunction(bucketCount, handle.getHiveTypes().get()); case PRESTO_NATIVE: return createPrestoNativeBucketFunction(bucketCount, handle.getTypes().get()); default: throw new IllegalArgumentException("Unsupported bucket function type " + bucketFunctionType); } }
Source:
public void writePacketData(RailcraftOutputStream data) throws IOException { super.writePacketData(data); tankManager.writePacketData(data); data.writeBoolean(boiler.isBurning()); }

Target:
public void writePacketData(RailcraftOutputStream data) throws IOException { super.writePacketData(data); // tankManager.writePacketData(data); data.writeBoolean(boiler.isBurning()); }
Source:
public void verifyTableProperty(String propertyName, int propertyValue) { waitForElementByElement(table); Assertion.assertEquals(table.getAttribute(propertyName), Integer.toString(propertyValue)); PageObjectLogging.log( "verifyTableProperty", "table has correct " + propertyName + " property", true ); }

Target:
private void verifyTableProperty(String propertyName, int propertyValue) { waitForElementByElement(table); Assertion.assertEquals(table.getAttribute(propertyName), Integer.toString(propertyValue)); PageObjectLogging.log( "verifyTableProperty", "table has correct " + propertyName + " property", true ); }
Source:
public ColumnMetadata_v4(String[] name, PrimitiveType.PrimitiveTypeName primitiveType, Object minValue, Object maxValue, Long nulls) { this.name = name; this.minValue = minValue; this.maxValue = maxValue; this.nulls = nulls; this.primitiveType = primitiveType; }

Target:
public ColumnMetadata_v4(String[] name, PrimitiveType.PrimitiveTypeName primitiveType, Object minValue, Object maxValue, Long nulls) { super(name, primitiveType, minValue, maxValue, nulls); }
Source:
private ByteBuffer parsePacketIDBAndNRB(int blockLength) throws IOException { ByteBuffer pcapPacketData; pcapPacketData = ByteBuffer.allocate(blockLength - PcapFileValues.PCAPNG_PACKET_HEADER_SIZE); pcapPacketData.position(PcapFileValues.PCAPNG_PACKET_HEADER_SIZE); pcapPacketData.clear(); SeekableByteChannel fFileChannel; try { fFileChannel = getFileChannel(); fFileChannel.read(pcapPacketData); } catch (BadPcapFileException e1) { /* Just ignore */ } pcapPacketData.flip(); return pcapPacketData; }

Target:
private ByteBuffer parsePacketIDBAndNRB(int blockLength) throws IOException { ByteBuffer pcapPacketData; pcapPacketData = ByteBuffer.allocate(blockLength - PcapFileValues.PCAPNG_PACKET_HEADER_SIZE); pcapPacketData.clear(); SeekableByteChannel fFileChannel; try { fFileChannel = getFileChannel(); fFileChannel.read(pcapPacketData); } catch (BadPcapFileException e1) { /* Just ignore */ } pcapPacketData.flip(); return pcapPacketData; }
Source:
public void onDestroyView() { mWebViewStateOnDestroyView = new Bundle(); try { storeWebView(mWebViewStateOnDestroyView); mWebViewBridge.destroy(); } catch (Exception exp) { Log.w(TAG, exp.getMessage() + "", exp); } super.onDestroyView(); }

Target:
public void onDestroyView() { try { mWebViewBridge.destroy(); } catch (Exception exp) { Log.w(TAG, exp.getMessage() + "", exp); } mWebViewBridge = null; super.onDestroyView(); }
Source:
private static void deleteDir(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path, boolean recursive) { try { hdfsEnvironment.getFileSystem(context, path).delete(path, recursive); } catch (Exception e) { // don't fail if unable to delete path Logger.get(GlueHiveMetastore.class).warn(e, "Failed to delete path: " + path.toString()); } }

Target:
private static void deleteDir(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path, boolean recursive) { try { hdfsEnvironment.getFileSystem(context, path).delete(path, recursive); } catch (Exception e) { // don't fail if unable to delete path log.warn(e, "Failed to delete path: " + path.toString()); } }
Source:
private boolean isNakedTD1Key(String s) { return NAKED_TD1_KEY_PATTERN.matcher(s).matches(); }

Target:
private static boolean isNakedTD1Key(String s) { return NAKED_TD1_KEY_PATTERN.matcher(s).matches(); }
Source:
public long skip(long n) throws IOException { if (n <= 0) { return 0; } if (n > MOVEMENT_LIMIT) { mSequentialReadCount = 0; } else { ((Seekable) in).seek(mPos + n); } mPos += n; return n; }

Target:
public long skip(long n) throws IOException { if (n <= 0) { return 0; } if (n > MOVEMENT_LIMIT) { mSequentialReadCount = 0; } mPos += n; return n; }
Source:
protected void executeCommand(IDeviceManagementInteractor executor) throws DeploymentException { try { executor.startFB(resource, new FBDeploymentData("", resFB)); //$NON-NLS-1$ //TODO correctly determine prefix } catch (DeploymentException e) { throw e; } }

Target:
protected void executeCommand(IDeviceManagementInteractor executor) throws DeploymentException { executor.startFB(resource, new FBDeploymentData("", resFB)); //$NON-NLS-1$ //TODO correctly determine prefix }
Source:
void setReaderBudget() { reader.setResultSizeBudget(ariaBatchRows <= MIN_BATCH_ROWS ? UNLIMITED_BUDGET : targetResultBytes); }

Target:
private void setReaderBudget() { reader.setResultSizeBudget(ariaBatchRows <= MIN_BATCH_ROWS ? UNLIMITED_BUDGET : targetResultBytes); }
Source:
public static boolean stopIfIsPlaying(@Nullable AudioSlide slide) { if (playing.isPresent() && playing.get().getAudioSlide().equals(slide)) { playing.get().stop(); return true; } else { return false; } }

Target:
public synchronized static boolean stopIfIsPlaying(@Nullable AudioSlide slide) { if (playing.isPresent() && playing.get().getAudioSlide().equals(slide)) { playing.get().stop(); return true; } else { return false; } }
Source:
public static FileSystemContext create(ClientContext clientContext) { FileSystemContext ctx = new FileSystemContext(); ctx.init(clientContext, MasterInquireClient.Factory.create(clientContext.getClusterConf())); ctx.mUriValidationEnabled = clientContext.getUriValidationEnabled(); return ctx; }

Target:
public static FileSystemContext create(ClientContext clientContext) { FileSystemContext ctx = new FileSystemContext(); ctx.init(clientContext, MasterInquireClient.Factory.create(clientContext.getClusterConf())); return ctx; }
Source:
public void commitToFile() throws Exception { // Given afw.write(expectedContent, 0, expectedContent.length()); // When afw.commit(); // Then assertTrue(Files.size(af.toPath()) == expectedContent.length()); }

Target:
public void commitToFile() throws Exception { // Given afw.write(expectedContent, 0, expectedContent.length()); // When afw.commit(); // Then assertEquals(expectedContent.length(), Files.size(af.toPath())); }
Source:
protected void connect() throws IOException { // note that we are not connecting via JMX for testing mbeanServerConn = null; jmxc = null; ssProxy = StorageService.instance; msProxy = MessagingService.instance(); streamProxy = StreamManager.instance; compactionProxy = CompactionManager.instance; fdProxy = (FailureDetectorMBean) FailureDetector.instance; cacheService = CacheService.instance; spProxy = StorageProxy.instance; hhProxy = HintedHandOffManager.instance; gcProxy = new GCInspector(); gossProxy = Gossiper.instance; memProxy = ManagementFactory.getMemoryMXBean(); runtimeProxy = ManagementFactory.getRuntimeMXBean(); }

Target:
protected void connect() { // note that we are not connecting via JMX for testing mbeanServerConn = null; jmxc = null; ssProxy = StorageService.instance; msProxy = MessagingService.instance(); streamProxy = StreamManager.instance; compactionProxy = CompactionManager.instance; fdProxy = (FailureDetectorMBean) FailureDetector.instance; cacheService = CacheService.instance; spProxy = StorageProxy.instance; hhProxy = HintedHandOffManager.instance; gcProxy = new GCInspector(); gossProxy = Gossiper.instance; memProxy = ManagementFactory.getMemoryMXBean(); runtimeProxy = ManagementFactory.getRuntimeMXBean(); }
Source:
public boolean validate(Map<String, String> optionsMap) { if (shouldSkip()) { return true; } if (!super.validate(optionsMap)) { return false; } if (!validatePrincipalLogin()) { System.err.format("Principal login test failed.%n"); return false; } return true; }

Target:
public boolean validate(Map<String, String> optionsMap) { if (!super.validate(optionsMap)) { return false; } if (!validatePrincipalLogin()) { return false; } return true; }
Source:
public void createEdit() { Button button = createButton(buttonparent, buttonEdit_ID, buttonEdit_caption, true); buttonBar.pack(); }

Target:
private void createEdit() { Button button = createButton(buttonparent, buttonEdit_ID, buttonEdit_caption, true); buttonBar.pack(); }
Source:
public void centerOnCurrentLocation() { followMe = true; if (getMapController().getLocation() != null) { findMe(); } }

Target:
public void centerOnCurrentLocation() { followMe = true; findMe(); }
Source:
public void serialize(final DoublesSketch sketch, final JsonGenerator generator, final SerializerProvider provider) throws IOException, JsonProcessingException { generator.writeBinary(sketch.toByteArray(true)); }

Target:
public void serialize(final DoublesSketch sketch, final JsonGenerator generator, final SerializerProvider provider) throws IOException { generator.writeBinary(sketch.toByteArray(true)); }
Source:
public void releaseBuffer() { if (serializedCache != null) { serializedCache.release(); if (serializedCache.refCnt() == 0) { serializedCache = null; } } }

Target:
public synchronized void releaseBuffer() { if (serializedCache != null) { serializedCache.release(); if (serializedCache.refCnt() == 0) { serializedCache = null; } } }
Source:
public Credentials.IdentityProvider getProvider() { String nativeProvider = nativeGetProvider(nativePtr); String id = identityProvider.getId(); // Sanity check - ensure nothing changed in the OS if (nativeProvider.equals(id)) { return identityProvider; } else { throw new AssertionError("The provider from the Object Store differs from the one in Realm."); } }

Target:
public String getProvider() { return nativeGetProvider(nativePtr); }
Source:
public Integer add(Stream<E> entities) { return delegate().add(entities.filter(entity -> { boolean permitted = isOperationPermitted(entity, Action.CREATE); if (permitted) { createAcl(entity); } return permitted; })); }

Target:
public Integer add(Stream<E> entities) { return delegate().add(entities.filter(entity -> { //throws exception if no permission on the containing package isOperationPermitted(entity, Action.CREATE); createAcl(entity); return true; })); }
Source:
public void canIgnoreInvocationsWithJunit() throws InterruptedException { // given DelayedExecution delayedExecution = createZeroMillisDelayedExecution(); DelayedExecution twentyMillisDelayedExecution = createTwentyMillisDelayedExecution(); // when delayedExecution.allAsyncCallsStarted(); twentyMillisDelayedExecution.allAsyncCallsStarted(); // then verify(mock, timeout(50)).oneArg('1'); verify(mock, timeout(50)).oneArg('2'); }

Target:
public void canIgnoreInvocationsWithJunit() throws InterruptedException { // given DelayedExecution delayedExecution = createZeroMillisDelayedExecution(); DelayedExecution twentyMillisDelayedExecution = createTwentyMillisDelayedExecution(); // when delayedExecution.allAsyncCallsStarted(); // then verify(mock, timeout(50)).oneArg('1'); // when twentyMillisDelayedExecution.allAsyncCallsStarted(); // then verify(mock, timeout(50)).oneArg('2'); }
Source:
public final boolean isExtendedLifetimeValid() { //extended lifetime is only valid if it contains an access token if (mExtendedExpiresOn != null && !StringExtensions.IsNullOrBlank(mAccessToken)) { return !isTokenExpired(mExtendedExpiresOn); } else { return false; } }

Target:
public final boolean isExtendedLifetimeValid() { //extended lifetime is only valid if it contains an access token if (mExtendedExpiresOn != null && !StringExtensions.IsNullOrBlank(mAccessToken)) { return !isTokenExpired(mExtendedExpiresOn); } return false; }
Source:
private boolean containtsOnlyValidXMLChars(String stringToValidate) { String pattern = "[^" + "\u0009\r\n" + "\u0020-\uD7FF" + "\uE000-\uFFFD" + "\ud800\udc00-\udbff\udfff" + "]"; String resultString = stringToValidate.replaceAll(pattern, ""); if (resultString.equals(stringToValidate)) { return true; } return false; }

Target:
private boolean containtsOnlyValidXMLChars(String stringToValidate) { String pattern = "[^" + "\u0009\r\n" + "\u0020-\uD7FF" + "\uE000-\uFFFD" + "\ud800\udc00-\udbff\udfff" + "]"; String resultString = stringToValidate.replaceAll(pattern, ""); return resultString.equals(stringToValidate); }
Source:
public void close() { super.close(); if (mRefCount != null) { mRefCount.decrementAndGet(); } }

Target:
public void close() { super.close(); mRefCount.decrementAndGet(); }
Source:
public void prepareToNewMarker() { drawerLayout.closeDrawers(); setLongClickListener(true); setToastMarkerInfo(); }

Target:
private void prepareToNewMarker() { drawerLayout.closeDrawers(); setLongClickListener(); setToastMarkerInfo(); }
Source:
void fun(String strPath, String StrParent, String StrChild, String prefix, String suffix, java.net.URI uri) throws Exception { // Questionable: check what is done with this file new File(strPath); // Noncompliant new File(StrParent, StrChild); // Noncompliant {{Make sure this file handling is safe here.}} File parent = new File(uri); // Noncompliant new File(parent, StrChild); // compliant we rely on the fact that parent should be highlighted File.createTempFile(prefix, suffix); // Noncompliant }

Target:
void fun(String strPath, String StrParent, String StrChild, String prefix, String suffix, java.net.URI uri) throws Exception { // Questionable: check what is done with this file new File(strPath); // Noncompliant new File(StrParent, StrChild); // Noncompliant {{Make sure this file handling is safe here.}} File parent = new File(uri); // Noncompliant new File(parent, StrChild); // compliant we rely on the fact that parent should be highlighted File.createTempFile(prefix, suffix); // Noncompliant File.createTempFile(prefix, suffix, parent); // compliant }
Source:
public void testMakeTimeZone_NoOffsets() throws IOException { int[][] times = {}; int[][] offsets = {}; try { createZoneInfo(times, offsets); fail("Did not detect no transitions"); } catch (IllegalStateException expected) { // Expected this to happen } }

Target:
public void testMakeTimeZone_NoOffsets() throws Exception { int[][] times = {}; int[][] offsets = {}; try { createZoneInfo(times, offsets); fail("Did not detect no transitions"); } catch (IllegalStateException expected) { // Expected this to happen } }
Source:
private Later(F0<A> producer) { this.memo = P.hardMemo(producer); }

Target:
Later(F0<A> producer) { this.memo = P.hardMemo(producer); }
Source:
private boolean isRunningFromCommandLine() { boolean runningFromCommandLine = false; // first look up all OptionProcessors and see if running from command line option is set Collection<? extends OptionProcessor> optionProcessors = Lookup.getDefault().lookupAll(OptionProcessor.class); Iterator<? extends OptionProcessor> optionsIterator = optionProcessors.iterator(); while (optionsIterator.hasNext()) { // find CommandLineOptionProcessor OptionProcessor processor = optionsIterator.next(); if (!(processor instanceof CommandLineOptionProcessor)) { continue; } // check if we are running from command line runningFromCommandLine = ((CommandLineOptionProcessor) processor).isRunFromCommandLine(); return runningFromCommandLine; } return false; }

Target:
private boolean isRunningFromCommandLine() { // first look up all OptionProcessors and see if running from command line option is set Collection<? extends OptionProcessor> optionProcessors = Lookup.getDefault().lookupAll(OptionProcessor.class); Iterator<? extends OptionProcessor> optionsIterator = optionProcessors.iterator(); while (optionsIterator.hasNext()) { // find CommandLineOptionProcessor OptionProcessor processor = optionsIterator.next(); if ((processor instanceof CommandLineOptionProcessor)) { // check if we are running from command line return ((CommandLineOptionProcessor) processor).isRunFromCommandLine(); } } return false; }
Source:
private String createAndGetLockPath() throws InterruptedException, KeeperException { // Create locks if it does not exist if (zk.exists(lockPath.toString(), false) == null) { try { Util.mkdir(zk, lockPath.toString(), ZooDefs.Ids.OPEN_ACL_UNSAFE); } catch (CloudnameException e) { log.log( java.util.logging.Level.INFO, "CloudnameException while trying to get lock path " + absoluteLockPath, e); } } return lockPath + "/" + lockName; }

Target:
private String createAndGetLockPath() throws InterruptedException, KeeperException { // Create locks if it does not exist if (zk.exists(lockPath, false) == null) { try { Util.mkdir(zk, lockPath, ZooDefs.Ids.OPEN_ACL_UNSAFE); } catch (CloudnameException e) { log.log( java.util.logging.Level.INFO, "CloudnameException while trying to get lock path " + absoluteLockPath, e); } } return lockPath + "/" + lockName; }
Source:
public Tuple getTuple(EntityKey key, TupleContext tupleContext) { Entity entity = getEntity( key, tupleContext.getOptionsContext() ); if ( entity != null ) { return new Tuple( new RedisTupleSnapshot( entity.getProperties() ) ); } else if ( isInTheQueue( key, tupleContext ) ) { // The key has not been inserted in the db but it is in the queue return new Tuple( new RedisTupleSnapshot( entity.getProperties() ) ); } else { return null; } }

Target:
public Tuple getTuple(EntityKey key, TupleContext tupleContext) { Entity entity = getEntity( key ); if ( entity != null ) { return new Tuple( new RedisTupleSnapshot( entity.getProperties() ) ); } else { return null; } }
Source:
public void addDataSource(long dataSourceObjectId) throws IngestStreamClosedException { // Do nothing System.out.println("### DefaultAddImageTaskIngestStream - addDataSource " + dataSourceObjectId); }

Target:
public void addDataSource(long dataSourceObjectId) throws IngestStreamClosedException { // Do nothing }
Source:
private void deleteEmptyStagingDirectories(List<DeclaredIntentionToWrite> declaredIntentionsToWrite) { for (DeclaredIntentionToWrite declaredIntentionToWrite : declaredIntentionsToWrite) { Path path = declaredIntentionToWrite.getRootPath(); if (declaredIntentionToWrite.isTemporaryTable()) { // for temporary table simply delete the entire directory deleteRecursivelyIfExists(declaredIntentionToWrite.getContext(), hdfsEnvironment, path); continue; } if (declaredIntentionToWrite.getMode() != WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY) { continue; } recursiveDeleteFilesAndLog(declaredIntentionToWrite.getContext(), path, ImmutableList.of(), true, "staging directory cleanup"); } }

Target:
private void deleteEmptyStagingDirectories(List<DeclaredIntentionToWrite> declaredIntentionsToWrite) { for (DeclaredIntentionToWrite declaredIntentionToWrite : declaredIntentionsToWrite) { if (declaredIntentionToWrite.getMode() != WriteMode.STAGE_AND_MOVE_TO_TARGET_DIRECTORY) { continue; } Path path = declaredIntentionToWrite.getRootPath(); recursiveDeleteFilesAndLog(declaredIntentionToWrite.getContext(), path, ImmutableList.of(), true, "staging directory cleanup"); } }
Source:
public static String getFileExtension(File file) throws Exception { return FilenameUtils.getExtension(file.getAbsolutePath()).toLowerCase(); }

Target:
public static String getFileExtension(File file) { return FilenameUtils.getExtension(file.getAbsolutePath()).toLowerCase(); }
Source:
private void loadPerspectiveAndCheckLoadingTime(String perspectiveID, boolean headerIncluded) { //long loadingStart = System.currentTimeMillis(); String standalonePerspectiveURL = getStandalonePerspectiveURL(perspectiveID, headerIncluded); driver.get(standalonePerspectiveURL); BusyPopup.waitForDisappearance(); ApplicationLoadingPopup.waitForDisappearance(PERSPECTIVE_LOADING_TIMEOUT); //double perspectiveLoadingTime = (System.currentTimeMillis() - loadingStart) / (double) 1000; //TODO: What is the acceptable loading time? Do we want to test this? //assertThat(perspectiveLoadingTime) // .as("It should take less than "+PERSPECTIVE_LOADING_TIMEOUT+" seconds to load the perspective " + perspectiveID + ".") // .isLessThan(PERSPECTIVE_LOADING_TIMEOUT); }

Target:
private void loadPerspectiveAndCheckLoadingTime(String perspectiveID, boolean headerIncluded) { //long loadingStart = System.currentTimeMillis(); String standalonePerspectiveURL = getStandalonePerspectiveURL(perspectiveID, headerIncluded); driver.get(standalonePerspectiveURL); ApplicationLoadingPopup.waitForDisappearance(PERSPECTIVE_LOADING_TIMEOUT); BusyPopup.waitForDisappearance(); //double perspectiveLoadingTime = (System.currentTimeMillis() - loadingStart) / (double) 1000; //TODO: What is the acceptable loading time? Do we want to test this? //assertThat(perspectiveLoadingTime) // .as("It should take less than " + PERSPECTIVE_LOADING_TIMEOUT + " seconds to load the perspective " + perspectiveID + ".") // .isLessThan(PERSPECTIVE_LOADING_TIMEOUT); }
Source:
public static void updateNotification(Context context, MasterSecret masterSecret, long threadId) { if (TextSecurePreferences.isNotificationsEnabled(context)) { if (visibleThread == threadId) { DatabaseFactory.getThreadDatabase(context).setRead(threadId); sendInThreadNotification(context); } else { updateNotification(context, masterSecret, true); } } updateBadge(context); }

Target:
public static void updateNotification(Context context, MasterSecret masterSecret, long threadId) { if (!TextSecurePreferences.isNotificationsEnabled(context)) { return; } if (visibleThread == threadId) { DatabaseFactory.getThreadDatabase(context).setRead(threadId); sendInThreadNotification(context); } else { updateNotification(context, masterSecret, true); } }
Source:
GdkColor getContextColor () { long /*int*/ fontHandle = fontHandle (); long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); GdkRGBA rgba = new GdkRGBA (); if (OS.GTK_VERSION < OS.VERSION(3, 18, 0)) { rgba = display.styleContextGetColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba); } else { int styleState = OS.gtk_widget_get_state_flags(handle); rgba = display.styleContextGetColor (context, styleState, rgba); } return display.toGdkColor (rgba); }

Target:
GdkColor getContextColor () { long /*int*/ fontHandle = fontHandle (); long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); int styleState = OS.gtk_widget_get_state_flags(handle); GdkRGBA rgba = new GdkRGBA (); rgba = display.styleContextGetColor (context, styleState, rgba); return display.toGdkColor (rgba); }
Source:
public void zrevrangeByScoreWithScores(final byte[] key, final double max, final double min, final int offset, final int count) { sendCommand(ZREVRANGEBYSCORE, key, toByteArray(min), toByteArray(max), LIMIT.raw, toByteArray(offset), toByteArray(count), WITHSCORES.raw); }

Target:
public void zrevrangeByScoreWithScores(final byte[] key, final double max, final double min, final int offset, final int count) { sendCommand(ZREVRANGEBYSCORE, key, toByteArray(max), toByteArray(min), LIMIT.raw, toByteArray(offset), toByteArray(count), WITHSCORES.raw); }
Source:
public void write(int b) throws IOException { mSingleCharWrite[0] = (byte) b; write(mSingleCharWrite, 0, 1); }

Target:
public void write(int b) throws IOException { mSingleCharWrite[0] = (byte) b; write(mSingleCharWrite); }
Source:
public UploadDirectoryToCDN(String username, String apiKey) { Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule()); BlobStoreContext context = ContextBuilder.newBuilder(PROVIDER) .credentials(username, apiKey) .modules(modules) .buildView(BlobStoreContext.class); storage = context.getBlobStore(); rackspace = context.unwrap(CloudFilesApiMetadata.CONTEXT_TOKEN).getApi(); }

Target:
public UploadDirectoryToCDN(String username, String apiKey) { BlobStoreContext context = ContextBuilder.newBuilder(PROVIDER) .credentials(username, apiKey) .buildView(BlobStoreContext.class); storage = context.getBlobStore(); rackspace = context.unwrap(CloudFilesApiMetadata.CONTEXT_TOKEN).getApi(); // can use unwrapApi() in jclouds 1.7.0 }
Source:
public boolean isTypeSupported(Class<T> clazz) { // TODO: Add other types? Float, etc if (String.class.isAssignableFrom(clazz) || Integer.class.isAssignableFrom(clazz) || Boolean.class.isAssignableFrom(clazz)) { return true; } return false; }

Target:
protected boolean isTypeSupported(Class<T> clazz) { // TODO: Add other types? Float, etc if (String.class.isAssignableFrom(clazz) || Integer.class.isAssignableFrom(clazz) || Boolean.class.isAssignableFrom(clazz)) { return true; } return false; }
Source:
public static Object valueForStringWithType(String value, VoltType type) { if (type == null || type == VoltType.NULL) { return null; } // leverage existing (rather heavyweight) code to convert param types Object retval = ParameterConverter.tryToMakeCompatible(type.classFromType(), value); // check the result type in an assert assert(ParameterConverter.verifyParameterConversion(retval, type.classFromType())); return retval; }

Target:
public static Object valueForStringWithType(String value, VoltType type) { if (type == VoltType.NULL) { return null; } // leverage existing (rather heavyweight) code to convert param types Object retval = ParameterConverter.tryToMakeCompatible(type.classFromType(), value); // check the result type in an assert assert(ParameterConverter.verifyParameterConversion(retval, type.classFromType())); return retval; }
Source:
public void testContructor() throws IOException { String code = "S2020-04-04"; ReportingPeriod period = ReportingPeriod.from(code); assertEquals(period.getClass(), SinceX.class); assertEquals(period.getClass(), SinceX.class); }

Target:
public void testContructor() throws IOException { String code = "S2020-04-04"; ReportingPeriod period = ReportingPeriod.from(code); assertEquals(period.getClass(), SinceX.class); }
Source:
public long getReadyTimestamp(Constraints viewConstraints) { String normalizedConstraints = getNormalizedConstraints(viewConstraints); Path signalPath = new Path(signalDirectory, normalizedConstraints); // check if the signal exists try { try { FileStatus signalStatus = rootFileSystem.getFileStatus(signalPath); return signalStatus.getModificationTime(); } catch (final FileNotFoundException ex) { // empty, will be thrown when the signal path doesn't exist } return -1; } catch (NumberFormatException e) { throw new DatasetException("Signal contents were modified to not be a number: " + signalPath, e); } catch (IOException e) { throw new DatasetIOException("Could not access signal path: " + signalPath, e); } }

Target:
public long getReadyTimestamp(Constraints viewConstraints) { String normalizedConstraints = getNormalizedConstraints(viewConstraints); Path signalPath = new Path(signalDirectory, normalizedConstraints); // check if the signal exists try { try { FileStatus signalStatus = rootFileSystem.getFileStatus(signalPath); return signalStatus.getModificationTime(); } catch (final FileNotFoundException ex) { // empty, will be thrown when the signal path doesn't exist } return -1; } catch (IOException e) { throw new DatasetIOException("Could not access signal path: " + signalPath, e); } }
Source:
public void checkpoint() { throw new UnsupportedOperationException("Checkpoint is not supported in NoopJournalSystem"); }

Target:
public void checkpoint()
Source:
public String getTasksJsonString(long taskId) throws JSONException { TaskObject task = TaskObject.get(taskId); return new ConvertSprintBacklog().getTaskJsonString(task); }

Target:
public String getTasksJsonString(long taskId) throws JSONException { TaskObject task = TaskObject.get(taskId); return ConvertSprintBacklog.getTaskJsonString(task); }
Source:
private void addVolumeToDb(final GlusterVolumeEntity createdVolume) { TransactionSupport.executeInNewTransaction( new TransactionMethod<Void>() { @Override public Void runInTransaction() { // volume fetched from VDSM doesn't contain cluster id GlusterFS // is not aware of multiple clusters createdVolume.setClusterId(getVdsGroupId()); DbFacade.getInstance().getGlusterVolumeDao().save(createdVolume); return null; } }); }

Target:
private void addVolumeToDb(final GlusterVolumeEntity createdVolume) { // volume fetched from VDSM doesn't contain cluster id GlusterFS // is not aware of multiple clusters createdVolume.setClusterId(getVdsGroupId()); DbFacade.getInstance().getGlusterVolumeDao().save(createdVolume); }
Source:
public String getSelinuxEnforceMode() { if (selinuxEnforceMode == null) { // Nothing } else if (selinuxEnforceMode.equals(SELinuxMode.DISABLED)) { return constants.disabled(); } else if (selinuxEnforceMode.equals(SELinuxMode.PERMISSIVE)) { return constants.permissive(); } else if (selinuxEnforceMode .equals(SELinuxMode.ENFORCING)) { return constants.enforcing(); } return constants.notAvailableLabel(); }

Target:
public String getSelinuxEnforceMode() { return selinuxEnforceMode; }
Source:
public void startThreads() { if (!this.threadStarted) { synchronized (this) { if (!this.threadStarted) { int nbThreads = this.configuration.getProperty("mentions.poolSize", 1); for (int i = 0; i < nbThreads; i++) { startConsumer(); } this.threadStarted = true; } } } }

Target:
public void startThreads() { synchronized (this) { if (!this.threadStarted) { int nbThreads = this.configuration.getProperty("mentions.poolSize", 1); for (int i = 0; i < nbThreads; i++) { startConsumer(); } this.threadStarted = true; } } }
Source:
public void init(EObject original, EditingDomain editingDomain) { List<EStructuralFeature> features = featuresProvider .getFeatures(original); initControlFactory(editingDomain, original); for (final EStructuralFeature feature : features) { if(!featuresProvider.getClass().equals(FeaturesProvider.class) || isToBeRendered(feature) ){ createControlForFeature(feature); } } // toolkit.paintBordersFor(main); this.layout(); }

Target:
public void init(EObject original, EditingDomain editingDomain) { List<EStructuralFeature> features = featuresProvider .getFeatures(original); initControlFactory(editingDomain, original); for (final EStructuralFeature feature : features) { createControlForFeature(feature); } // toolkit.paintBordersFor(main); this.layout(); }
Source:
public static DecoderResult failure(Throwable cause) { ObjectUtil.checkNotNull(cause, "cause"); return new DecoderResult(cause); }

Target:
public static DecoderResult failure(Throwable cause) { return new DecoderResult(ObjectUtil.checkNotNull(cause, "cause")); }
Source:
public Collection<String> getNames() { if (names == null) { names = new HashSet<>(named.keySet()); namedArgumentFinder.forEach(args -> names.addAll(args.getNames())); } return Collections.unmodifiableSet(names); }

Target:
public Collection<String> getNames() { final Set<String> names = new HashSet<>(named.keySet()); namedArgumentFinder.forEach(args -> names.addAll(args.getNames())); return Collections.unmodifiableSet(names); }
Source:
public FBOConfig getFboConfig(ResourceUrn fboName) { FBOConfig fboConfig = fboConfigs.get(fboName); if (fboConfig == null) { logger.error("Failed to retrieve FBOConfig '" + fboName + "'!"); } return fboConfig; }

Target:
public FBOConfig getFboConfig(ResourceUrn fboName) { FBOConfig fboConfig = fboConfigs.get(fboName); if (fboConfig == null) { logger.warn("Failed to retrieve FBOConfig '" + fboName + "'!"); } return fboConfig; }
Source:
public WorkspaceItem build() { try { return workspaceItem; } catch (Exception e) { return handleException(e); } }

Target:
public WorkspaceItem build() { return workspaceItem; }
Source:
public void update(int inputIndex) { status.setTargetOutputRowCount(super.update(inputIndex, status.getOutPosition())); if (logger.isDebugEnabled()) { logger.debug("BATCH_STATS, incoming {}: {}", inputIndex == 0 ? "left" : "right", getRecordBatchSizer(inputIndex)); } }

Target:
public void update(int inputIndex) { status.setTargetOutputRowCount(super.update(inputIndex, status.getOutPosition())); logger.debug("BATCH_STATS, incoming {}: {}", inputIndex == 0 ? "left" : "right", getRecordBatchSizer(inputIndex)); }
Source:
public int size() { int size = 0; // We have to loop through to make sure to remove expired entries for (Iterator<InternalCacheEntry<K, V>> iter = iterator(); iter.hasNext(); ) { if (iter.next().getValue() == null) continue; if (++size == Integer.MAX_VALUE) return Integer.MAX_VALUE; } return size; }

Target:
public int size() { int size = 0; // We have to loop through to make sure to remove expired entries for (Iterator<InternalCacheEntry<K, V>> iter = iterator(); iter.hasNext(); ) { iter.next(); if (++size == Integer.MAX_VALUE) return Integer.MAX_VALUE; } return size; }
Source:
public static File getDiskCacheDir(Context context, String uniqueName) { // Check if media is mounted or storage is built-in, if so, try and use external cache dir // otherwise use internal cache dir. final String cachePath; if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) && context.getExternalCacheDir() != null) { cachePath = context.getExternalCacheDir().getPath(); } else { cachePath = context.getCacheDir().getPath(); } return new File(cachePath + File.separator + uniqueName); }

Target:
public static File getDiskCacheDir(Context context, String uniqueName) { // Check if media is mounted or storage is built-in, if so, try and use external cache dir // otherwise use internal cache dir. final String cachePath; if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && context.getExternalCacheDir() != null) { cachePath = context.getExternalCacheDir().getPath(); } else { cachePath = context.getCacheDir().getPath(); } return new File(cachePath + File.separator + uniqueName); }
Source:
public void testLogin() throws Throwable { InstrumentationRegistry.getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { loginTestTask.execute(); } }); assertThat(completionLatch.await(), is(true)); }

Target:
public void testLogin() throws Throwable { runOnMainSync(new Runnable() { @Override public void run() { loginTestTask.execute(); } }); completionLatch.await(); }
Source:
public boolean onOptionsItemSelected(MenuItem item) { // home references the app icon if (item.getItemId() == android.R.id.home) { toggle(); // toggles the state of the sliding menu if(getSlidingMenu().isMenuShowing() && menu.isAdded()) setTitle(((ITitleable)menu).getTitle()); return true; } return false; }

Target:
public boolean onOptionsItemSelected(MenuItem item) { // home references the app icon if (item.getItemId() == android.R.id.home) { toggle(); // toggles the state of the sliding menu if(getSlidingMenu().isMenuShowing() && menu.isAdded()){ setTitle(((ITitleable)menu).getTitle()); } return true; } return false; }
Source:
private String getThemePrefixedPath(String path) { String prefix = themeProperties != null ? themeProperties.get(IntroTheme.ATT_ID) : null; prefix = prefix == null ? "" : prefix.trim(); //$NON-NLS-1$ if (prefix.length() == 0) { return null; } return prefix.charAt(prefix.length() - 1) == Path.SEPARATOR ? prefix + path : prefix + Path.SEPARATOR + path; }

Target:
private String getThemePrefixedPath(String path) { String prefix = themeProperties != null ? themeProperties.get(IntroTheme.ATT_ID) : null; prefix = prefix == null ? "" : prefix.trim(); //$NON-NLS-1$ if (prefix.length() == 0) { return null; } return prefix + Path.SEPARATOR + path; }
Source:
private static void merge(AggregatedCalledFunction destination, AggregatedCalledFunction source) { long sourceDuration = source.getDuration(); long sourceSelfTime = source.getSelfTime(); destination.addToDuration(sourceDuration); destination.addToSelfTime(sourceSelfTime); destination.fStatistics.update(source.fStatistics.getMaxSegment(),source.fStatistics.getMinSegment(), sourceSelfTime); // merge the children callees. mergeChildren(destination, source); }

Target:
private static void merge(AggregatedCalledFunction destination, AggregatedCalledFunction source) { long sourceDuration = source.getDuration(); long sourceSelfTime = source.getSelfTime(); destination.addToDuration(sourceDuration); destination.addToSelfTime(sourceSelfTime); destination.fStatistics.update(source.fStatistics.getMaxSegment(), source.fStatistics.getMinSegment(), sourceDuration, sourceSelfTime); // merge the children callees. mergeChildren(destination, source); }
Source:
public void setDisabledAdministrativeMonitors(Set<String> disabledAdministrativeMonitors) { this.disabledAdministrativeMonitors = new CopyOnWriteArraySet<>(disabledAdministrativeMonitors); }

Target:
public void setDisabledAdministrativeMonitors(Set<String> disabledAdministrativeMonitors) { synchronized (this.disabledAdministrativeMonitors) { this.disabledAdministrativeMonitors.clear(); this.disabledAdministrativeMonitors.addAll(disabledAdministrativeMonitors); } }
Source:
private static ByteBuf serializeProtobuf(MessageLite msg, ByteBufAllocator allocator) { int size = msg.getSerializedSize(); ByteBuf buf = allocator.heapBuffer(size, size); try { msg.writeTo(new ByteBufOutputStream(buf)); } catch (IOException e) { // This is in-memory serialization, should not fail throw new RuntimeException(e); } // Advance writer idx buf.writerIndex(buf.capacity()); return buf; }

Target:
private static ByteBuf serializeProtobuf(MessageLite msg, ByteBufAllocator allocator) { int size = msg.getSerializedSize(); ByteBuf buf = allocator.heapBuffer(size, size); try { msg.writeTo(new ByteBufOutputStream(buf)); } catch (IOException e) { // This is in-memory serialization, should not fail throw new RuntimeException(e); } return buf; }
Source:
public ShovingMatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); // Until end of turn, all creatures gain "{tap}: Tap target creature." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect( new GainAbilityAllEffect(ability, Duration.EndOfTurn, new FilterCreaturePermanent()) .setText("Until end of turn, all creatures gain \"{T}: Tap target creature.\"") ); }

Target:
public ShovingMatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); // Until end of turn, all creatures gain "{tap}: Tap target creature." Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect( new GainAbilityAllEffect(ability, Duration.EndOfTurn, new FilterCreaturePermanent()) .setText("Until end of turn, all creatures gain \"{T}: Tap target creature.\"") ); }
Source:
public void setRequiredParametersForCreation(DateTime paymentDate, Timeframe timeframe, Integer requestedAmount, Boolean build){ this.paymentDate = paymentDate; this.timeframe = timeframe; this.requestedAmount = requestedAmount; //??? if(build){ this.build = build; }else{ this.building = build; } }

Target:
public void setRequiredParametersForCreation(DateTime paymentDate, Timeframe timeframe, Integer requestedAmount, Boolean build){ this.paymentDate = paymentDate; this.timeframe = timeframe; this.requestedAmount = requestedAmount; if(build){ this.build = build; } }
Source:
public <T> ModelAdaptor<? super T> getModelAdaptor(Class<T> attributeType) { //noinspection unchecked return (ModelAdaptor<T>) adaptors.get(attributeType); }

Target:
public <T> ModelAdaptor<? super T> getModelAdaptor(Class<T> attributeType) { //noinspection unchecked return (ModelAdaptor<? super T>) adaptors.get(attributeType); }
Source:
public <R, X extends Exception> R withHandle(HandleCallback<R, X> callback) throws X { Handle h = JdbiUtil.getHandle(jdbi); R result = callback.withHandle(h); // close if not in transaction JdbiUtil.closeIfNeeded(h); return result; }

Target:
public <R, X extends Exception> R withHandle(HandleCallback<R, X> callback) throws X { Handle h = JdbiUtil.getHandle(jdbi); try { return callback.withHandle(h); } finally { JdbiUtil.closeIfNeeded(h); } }
Source:
public String getReplicaPath() { // GetRequest.Cloud_Replica_Keyword is added to avoid error on its peers. return getMountPath() + File.separator + GetRequest.Cloud_Replica_Keyword + File.separator + partitionId.toPathString(); }

Target:
public String getReplicaPath() { // GetRequest.Cloud_Replica_Keyword is added to avoid error on its peers. return GetRequest.Cloud_Replica_Keyword + File.separator + getMountPath() + File.separator + partitionId.toPathString(); }