auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRequestRollWithMultiWal() throws Exception { Map<FSHLog, Path> wals = new HashMap<>(); for (int i = 1; i <= 3; i++) { FSHLog wal = new FSHLog(FS, ROOT_DIR, LOG_DIR, ARCHIVE_DIR, CONF, null, true, WAL_PREFIX, getWALSuffix(i)); wal.init(); wals.put(wal, wal.getCurrentFileName()); ROLLER.addWAL(wal); Thread.sleep(3000); } Iterator<Map.Entry<FSHLog, Path>> it = wals.entrySet().iterator(); Map.Entry<FSHLog, Path> walEntry = it.next(); walEntry.getKey().requestLogRoll(); Thread.sleep(5000); assertNotEquals(walEntry.getValue(), walEntry.getKey().getCurrentFileName()); walEntry.setValue(walEntry.getKey().getCurrentFileName()); while (it.hasNext()) { walEntry = it.next(); assertEquals(walEntry.getValue(), walEntry.getKey().getCurrentFileName()); } Thread.sleep(LOG_ROLL_PERIOD + 5000); for (Map.Entry<FSHLog, Path> entry : wals.entrySet()) { assertNotEquals(entry.getValue(), entry.getKey().getCurrentFileName()); entry.getKey().close(); } }

Target:
public void testRequestRollWithMultiWal() throws Exception { Map<FSHLog, Path> wals = new HashMap<>(); for (int i = 1; i <= 3; i++) { FSHLog wal = new FSHLog(FS, ROOT_DIR, LOG_DIR, ARCHIVE_DIR, CONF, null, true, WAL_PREFIX, getWALSuffix(i)); wal.init(); wals.put(wal, wal.getCurrentFileName()); ROLLER.addWAL(wal); Thread.sleep(1000); } Iterator<Map.Entry<FSHLog, Path>> it = wals.entrySet().iterator(); Map.Entry<FSHLog, Path> walEntry = it.next(); walEntry.getKey().requestLogRoll(); Thread.sleep(5000); assertNotEquals(walEntry.getValue(), walEntry.getKey().getCurrentFileName()); walEntry.setValue(walEntry.getKey().getCurrentFileName()); while (it.hasNext()) { walEntry = it.next(); assertEquals(walEntry.getValue(), walEntry.getKey().getCurrentFileName()); } Thread.sleep(LOG_ROLL_PERIOD + 5000); for (Map.Entry<FSHLog, Path> entry : wals.entrySet()) { assertNotEquals(entry.getValue(), entry.getKey().getCurrentFileName()); entry.getKey().close(); } }
Source:
public void testCreateSmbFileObjectWithBackSlash3() throws IOException { System.setProperty("file.separator", "\\"); SmbShare smbShare = new SmbShare("smb://myshare\\shared\\"); SmbSession smbSession = new SmbSession(smbShare); SmbFile smbFile = smbSession.createSmbFileObject("..\\another"); assertEquals("smb://myshare/shared/../another", smbFile.getCanonicalPath()); }

Target:
public void testCreateSmbFileObjectWithBackSlash3() throws IOException { System.setProperty("file.separator", "\\"); SmbConfig config = new SmbConfig(); config.setHost("myshare"); config.setPort(445); config.setShareAndDir("shared\\"); SmbShare smbShare = new SmbShare(config); SmbSession smbSession = new SmbSession(smbShare); SmbFile smbFile = smbSession.createSmbFileObject("..\\another"); assertEquals("smb://myshare:445/another", smbFile.getPath()); smbSession.close(); }
Source:
public void listSettings() { ConfigurationClient configurationClient = createSyncConfigurationClient(); SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); PagedIterable<ConfigurationSetting> csStream = configurationClient.listSettings(settingSelector); csStream.streamByPage().forEach(setting -> { System.out.printf("Key: %s, Value: %s", setting.value().get(0).key(), setting.value().get(0).value()); }); END: com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector }

Target:
public void listSettings() { ConfigurationClient configurationClient = createSyncConfigurationClient(); SettingSelector settingSelector = new SettingSelector().keys("prodDBConnection"); configurationClient.listSettings(settingSelector).forEach(setting -> { System.out.printf("Key: %s, Value: %s", setting.key(), setting.value()); }); END: com.azure.data.applicationconfig.configurationclient.listSettings#settingSelector }
Source:
public void stop() throws InterruptedException { scheduler.shutdown(); scheduler.awaitTermination(60, TimeUnit.SECONDS); if (!scheduler.isTerminated()) { LOG.warn("Unable to terminate scheduler"); } }

Target:
public void stop() throws InterruptedException { scheduler.shutdown(); scheduler.awaitTermination(terminationDuration.toMillis(), TimeUnit.MILLISECONDS); if (!scheduler.isTerminated()) { LOG.warn("Unable to terminate scheduler"); scheduler.shutdownNow(); } }
Source:
public static void addUser() throws IOException, CommandFailedException { OfflineManagementClient offlineClient = ManagementClient.offline( OfflineOptions.standalone() .rootDirectory(new File(System.getProperty("user.dir"), "target/jboss-as")) .configurationFile("standalone.xml") .build()); offlineClient.apply(PropertiesFileAuth.mgmtUsers().defineUser(USERNAME, PASS)); }

Target:
public static void addUser() throws IOException, CommandFailedException { offlineClient = ManagementClient.offline( OfflineOptions.standalone() .rootDirectory(new File("target/jboss-as")) .configurationFile("standalone.xml") .build()); offlineClient.apply(PropertiesFileAuth.mgmtUsers().defineUser(USERNAME, PASS)); }
Source:
public static Intent getPlayerIntent(@NonNull final Context context, @NonNull final Class targetClazz, @NonNull final PlayQueue playQueue, @Nullable final String quality, final boolean resumePlayback) { Intent intent = new Intent(context, targetClazz); final String cacheKey = SerializedCache.getInstance().put(playQueue, PlayQueue.class); if (cacheKey != null) intent.putExtra(VideoPlayer.PLAY_QUEUE_KEY, cacheKey); if (quality != null) intent.putExtra(VideoPlayer.PLAYBACK_QUALITY, quality); intent.putExtra(VideoPlayer.RESUME_PLAYBACK, resumePlayback); int playerType = intent.getIntExtra(VideoPlayer.PLAYER_TYPE, VideoPlayer.PLAYER_TYPE_VIDEO); intent.putExtra(VideoPlayer.PLAYER_TYPE, playerType); return intent; }

Target:
public static Intent getPlayerIntent(@NonNull final Context context, @NonNull final Class targetClazz, @NonNull final PlayQueue playQueue, @Nullable final String quality, final boolean resumePlayback) { Intent intent = new Intent(context, targetClazz); final String cacheKey = SerializedCache.getInstance().put(playQueue, PlayQueue.class); if (cacheKey != null) { intent.putExtra(VideoPlayer.PLAY_QUEUE_KEY, cacheKey); } if (quality != null) { intent.putExtra(VideoPlayer.PLAYBACK_QUALITY, quality); } intent.putExtra(VideoPlayer.RESUME_PLAYBACK, resumePlayback); intent.putExtra(VideoPlayer.PLAYER_TYPE, VideoPlayer.PLAYER_TYPE_VIDEO); return intent; }
Source:
public void execute(final ExecutionStack stack, final IDelegateBridge bridge) { if (battleState.isOver() || isDestroyerPresent() || isEvaderNotPresent() || isRetreatNotPossible() || isAutoWinScenario()) { return; } final Collection<Unit> unitsToRetreat = CollectionUtils.getMatches( battleState.getUnits(BattleState.Side.OFFENSE), Matches.unitCanEvade()); if (unitsToRetreat.isEmpty()) { return; } final Collection<Territory> retreatTerritories; if (Properties.getSubmersibleSubs(battleState.getGameData())) { retreatTerritories = List.of(battleState.getBattleSite()); } else { retreatTerritories = battleState.getAttackerRetreatTerritories(); } EvaderRetreat.retreatUnits( EvaderRetreat.Parameters.builder() .battleState(battleState) .battleActions(battleActions) .side(BattleState.Side.OFFENSE) .bridge(bridge) .possibleRetreatSites(retreatTerritories) .units(unitsToRetreat) .step(getName()) .build()); }

Target:
public void execute(final ExecutionStack stack, final IDelegateBridge bridge) { if (battleState.isOver() || isDestroyerPresent() || isEvaderNotPresent() || isRetreatNotPossible() || isAutoWinScenario()) { return; } final Collection<Unit> unitsToRetreat = CollectionUtils.getMatches( battleState.getUnits(BattleState.Side.OFFENSE), Matches.unitCanEvade()); if (unitsToRetreat.isEmpty()) { return; } EvaderRetreat.retreatUnits( EvaderRetreat.Parameters.builder() .battleState(battleState) .battleActions(battleActions) .side(BattleState.Side.OFFENSE) .bridge(bridge) .units(unitsToRetreat) .build(), Properties.getSubmersibleSubs(battleState.getGameData()) ? List.of(battleState.getBattleSite()) : battleState.getAttackerRetreatTerritories(), getName()); }
Source:
public Signature(StreamInput in) throws IOException { name = new FunctionName(in); kind = FunctionInfo.Type.values()[in.readVInt()]; int argsSize = in.readVInt(); argumentTypes = new ArrayList<>(argsSize); for (int i = 0; i < argsSize; i++) { argumentTypes.add(new TypeSignature(in)); } returnType = new TypeSignature(in); int variableConstraintsSize = in.readVInt(); typeVariableConstraints = new ArrayList<>(variableConstraintsSize); for (int i = 0; i < variableConstraintsSize; i++) { typeVariableConstraints.add(new TypeVariableConstraint(in)); } int arityGroupSize = in.readVInt(); variableArityGroup = new ArrayList<>(arityGroupSize); for (int i = 0; i < arityGroupSize; i++) { variableArityGroup.add(new TypeSignature(in)); } variableArity = in.readBoolean(); allowCoercion = in.readBoolean(); }

Target:
public Signature(StreamInput in) throws IOException { name = new FunctionName(in); kind = FunctionInfo.Type.values()[in.readVInt()]; int argsSize = in.readVInt(); argumentTypes = new ArrayList<>(argsSize); for (int i = 0; i < argsSize; i++) { argumentTypes.add(TypeSignature.fromStream(in)); } returnType = TypeSignature.fromStream(in); bindingInfo = null; }
Source:
private MetricRegistryImpl createMetricRegistry(String retentionPolicy, InfluxDB.ConsistencyLevel consistencyLevel) { MetricConfig metricConfig = new MetricConfig(); metricConfig.setProperty(InfluxdbReporterOptions.SCHEME.key(), "http"); metricConfig.setProperty(InfluxdbReporterOptions.HOST.key(), "localhost"); metricConfig.setProperty(InfluxdbReporterOptions.PORT.key(), String.valueOf(wireMockRule.port())); metricConfig.setProperty(InfluxdbReporterOptions.DB.key(), TEST_INFLUXDB_DB); metricConfig.setProperty(InfluxdbReporterOptions.RETENTION_POLICY.key(), retentionPolicy); metricConfig.setProperty(InfluxdbReporterOptions.CONSISTENCY.key(), consistencyLevel.name()); return new MetricRegistryImpl( MetricRegistryConfiguration.defaultMetricRegistryConfiguration(), Collections.singletonList(ReporterSetup.forReporter("test", metricConfig, new InfluxdbReporter()))); }

Target:
private MetricRegistryImpl createMetricRegistry(String retentionPolicy, InfluxDB.ConsistencyLevel consistencyLevel) { MetricConfig metricConfig = new MetricConfig(); metricConfig.setProperty(InfluxdbReporterOptions.HOST.key(), "localhost"); metricConfig.setProperty(InfluxdbReporterOptions.PORT.key(), String.valueOf(wireMockRule.port())); metricConfig.setProperty(InfluxdbReporterOptions.DB.key(), TEST_INFLUXDB_DB); metricConfig.setProperty(InfluxdbReporterOptions.RETENTION_POLICY.key(), retentionPolicy); metricConfig.setProperty(InfluxdbReporterOptions.CONSISTENCY.key(), consistencyLevel.name()); return new MetricRegistryImpl( MetricRegistryConfiguration.defaultMetricRegistryConfiguration(), Collections.singletonList(ReporterSetup.forReporter("test", metricConfig, new InfluxdbReporter()))); }
Source:
public boolean decode(byte[] wbxmlBody) { int i = 4; if (false == ((wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x05)) { return false; } if (false == ((wbxmlBody[i] & WBXML_TOKEN_WITH_ATTRS) == WBXML_TOKEN_WITH_ATTRS)) { return false; } i++; if ((wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x05) { i += 8; } if (false == ((wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x06 || (wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x07)) { return false; } if (wbxmlBody[i + 1] != WBXML_INLINE_STRING) { return false; } i += 2; int len = 0; int j = i; while (wbxmlBody[j] != 0) { j++; len++; } String value = new String(wbxmlBody, i, len); mEmailAddress = value; return true; }

Target:
public boolean decode(byte[] wbxmlBody) { try { int i = 4; if (false == ((wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x05)) { return false; } if (false == ((wbxmlBody[i] & WBXML_TOKEN_WITH_ATTRS) == WBXML_TOKEN_WITH_ATTRS)) { return false; } i++; if ((wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x05) { i += 8; } if (false == ((wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x06 || (wbxmlBody[i] & WBXML_TOKEN_MASK) == 0x07)) { return false; } if (wbxmlBody[i + 1] != WBXML_INLINE_STRING) { return false; } i += 2; int len = 0; int j = i; while (wbxmlBody[j] != 0) { j++; len++; } String value = new String(wbxmlBody, i, len); mEmailAddress = value; return true; } catch (Exception e) { if (Email.DEBUG) { Log.d(Email.LOG_TAG, "EMNReceiver::onReceive() exception caught"); } } return false; }
Source:
private static String runJob(final File repository, final String jobName) throws Exception { final String jobFileName = URLDecoder.decode(new File(repository, "jobs/" + jobName + ".analysis.xml").getPath(), "UTF-8"); final String confFileName = URLDecoder.decode(new File(repository, "conf.xml").getPath(), "UTF-8"); final ProcessBuilder builder = new ProcessBuilder(JAVA_EXECUTABLE, "-cp", System.getProperty("java.class.path"), Main.class.getCanonicalName(), "-job", jobFileName, "-conf", confFileName); final Process process = builder.start(); final StringBuilder result = new StringBuilder(); new Thread(() -> { try { final InputStream is = process.getInputStream(); int c; while ((c = is.read()) != -1) { result.append((char) c); } } catch (IOException e) { e.printStackTrace(); } }).start(); assertEquals(0, process.waitFor()); return result.toString(); }

Target:
private static String runJob(final File repository, final String jobName) throws Exception { final String jobFileName = getAbsoluteFilename(repository, "jobs/" + jobName + ".analysis.xml"); final String confFileName = getAbsoluteFilename(repository, "conf.xml"); final ProcessBuilder builder = new ProcessBuilder(JAVA_EXECUTABLE, "-cp", System.getProperty("java.class.path"), Main.class.getCanonicalName(), "-job", jobFileName, "-conf", confFileName); final Process process = builder.start(); final StringBuilder result = new StringBuilder(); new Thread(() -> { try { final InputStream is = process.getInputStream(); int c; while ((c = is.read()) != -1) { result.append((char) c); } } catch (IOException e) { e.printStackTrace(); } }).start(); assertEquals(0, process.waitFor()); return result.toString(); }
Source:
public static Collaboration getBaseProtocol(Resource resource) { if (resource != null && resource.getContents().size() > 0) { for (EObject eObject : resource.getContents()) { if (eObject instanceof Collaboration && ProtocolUtils.isProtocol(eObject)) { if (isBaseProtocol((Collaboration) eObject)) { return (Collaboration) eObject; } } } } else { Activator.log.error("Impossible to get content of the Model Library", null); } return null; }

Target:
public static Collaboration getBaseProtocol(Resource resource) { if (resource != null && resource.getContents().size() > 0) { TreeIterator<EObject> allContents = resource.getAllContents(); while (allContents.hasNext()) { EObject eObject = allContents.next(); if (eObject instanceof Collaboration && ProtocolUtils.isProtocol(eObject)) { if (isBaseProtocol((Collaboration) eObject)) { return (Collaboration) eObject; } } } } else { Activator.log.error("Impossible to get content of the Model Library", null); } return null; }
Source:
public List<List<String>> lemmatize(final List<String> tokens, final List<String> posTags) { List<List<String>> allLemmas = new ArrayList<List<String>>(); for (int i = 0; i < tokens.size(); i++) { allLemmas.add(this.getAllLemmas(tokens.get(i), posTags.get(i))); } return allLemmas; }

Target:
public List<List<String>> lemmatize(final List<String> tokens, final List<String> posTags) { List<List<String>> allLemmas = new ArrayList<>(); for (int i = 0; i < tokens.size(); i++) { allLemmas.add(this.getAllLemmas(tokens.get(i), posTags.get(i))); } return allLemmas; }
Source:
private HiveReader(HiveSourceSplit split) throws IOException { JobConf clonedConf = new JobConf(jobConfWrapper.conf()); addSchemaToConf(clonedConf); HiveTableInputSplit oldSplit = new HiveTableInputSplit(-1, split.toMapRedSplit(), clonedConf, split.getHiveTablePartition()); hiveMapredSplitReader = new HiveMapredSplitReader(clonedConf, partitionKeys, fieldTypes, selectedFields, oldSplit, hiveShim); serializer = new RowDataSerializer((RowType) producedDataType.getLogicalType()); }

Target:
private HiveReader(HiveSourceSplit split) throws IOException { selectedFields = computeSelectedFields(); JobConf clonedConf = new JobConf(jobConfWrapper.conf()); addSchemaToConf(clonedConf); HiveTableInputSplit oldSplit = new HiveTableInputSplit(-1, split.toMapRedSplit(), clonedConf, split.getHiveTablePartition()); hiveMapredSplitReader = new HiveMapredSplitReader(clonedConf, partitionKeys, fieldTypes, selectedFields, oldSplit, hiveShim); serializer = new RowDataSerializer(producedRowType); }
Source:
public void onTimer(MessageCollector collector, TaskCoordinator coordinator) { List<TriggerKey<WK>> keys = triggerScheduler.runPendingCallbacks(); for (TriggerKey<WK> key : keys) { TriggerImplWrapper triggerImplWrapper = triggers.get(key); if (triggerImplWrapper != null) { triggerImplWrapper.onTimer(key, collector, coordinator); } } }

Target:
public void onTimer(MessageCollector collector, TaskCoordinator coordinator) { List<TriggerKey<WK>> keys = triggerScheduler.runPendingCallbacks(); for (TriggerKey<WK> key : keys) { TriggerImplHandler triggerImplHandler = triggers.get(key); if (triggerImplHandler != null) { triggerImplHandler.onTimer(key, collector, coordinator); } } }
Source:
protected void executeCommand() { boolean hasConnectStorageSucceeded = connectToStorage(); VDSReturnValue returnValueUpdatedStorageDomain = updateStatsForDomain(); if (hasConnectStorageSucceeded && returnValueUpdatedStorageDomain.getSucceeded()) { final StorageDomain updatedStorageDomain = (StorageDomain) returnValueUpdatedStorageDomain.getReturnValue(); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getStorageConnDao().update(getParameters().getStorageServerConnection()); getStorageDomainDynamicDao().update(updatedStorageDomain.getStorageDynamicData()); return null; } }); setSucceeded(true); } }

Target:
protected void executeCommand() { StoragePoolIsoMap map = getStoragePoolIsoMap(); changeStorageDomainStatusInTransaction(map,StorageDomainStatus.Locked); boolean hasConnectStorageSucceeded = connectToStorage(); VDSReturnValue returnValueUpdatedStorageDomain = null; if(!hasConnectStorageSucceeded) { setSucceeded(false); VdcFault f = new VdcFault(); f.setError(VdcBllErrors.StorageServerConnectionError); getReturnValue().setFault(f); changeStorageDomainStatusInTransaction(map,StorageDomainStatus.Maintenance); return; } returnValueUpdatedStorageDomain = updateStatsForDomain(); if (returnValueUpdatedStorageDomain.getSucceeded()) { final StorageDomain updatedStorageDomain = (StorageDomain) returnValueUpdatedStorageDomain.getReturnValue(); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getStorageConnDao().update(getParameters().getStorageServerConnection()); getStorageDomainDynamicDao().update(updatedStorageDomain.getStorageDynamicData()); return null; } }); setSucceeded(true); } changeStorageDomainStatusInTransaction(map,StorageDomainStatus.Maintenance); }
Source:
protected void addHttpRequestEntities(HttpRequestBase request) throws BugzillaRestException { super.addHttpRequestEntities(request); try { UserCredentials credentials = getClient().getLocation().getCredentials(AuthenticationType.REPOSITORY); if (credentials == null) { throw new IllegalStateException("Authentication requested without valid credentials"); } Gson gson = new GsonBuilder() .registerTypeAdapter(OldAttributes.class, new TaskAttributeTypeAdapter(getClient().getLocation())) .create(); StringEntity requestEntity = new StringEntity(gson.toJson(oldAttributes)); ((HttpPut) request).setEntity(requestEntity); } catch (UnsupportedEncodingException e) { com.google.common.base.Throwables.propagate(new CoreException( new Status(IStatus.ERROR, BugzillaRestCore.ID_PLUGIN, "Can not build HttpRequest", e))); } }

Target:
protected void addHttpRequestEntities(HttpRequestBase request) throws BugzillaRestException { super.addHttpRequestEntities(request); try { Gson gson = new GsonBuilder() .registerTypeAdapter(OldAttributes.class, new TaskAttributeTypeAdapter(getClient().getLocation())) .create(); StringEntity requestEntity = new StringEntity(gson.toJson(oldAttributes)); ((HttpPut) request).setEntity(requestEntity); } catch (UnsupportedEncodingException e) { Throwables.propagate(new CoreException( new Status(IStatus.ERROR, BugzillaRestCore.ID_PLUGIN, "Can not build HttpRequest", e))); } }
Source:
public static Collection<ByteArrayWrapper> spop(Region<ByteArrayWrapper, RedisSet> region, ByteArrayWrapper key, int popCount) { RedisSet redisSet = region.get(key); if (redisSet != null) { return redisSet.doSpop(region, key, popCount); } else { return null; } }

Target:
public static Collection<ByteArrayWrapper> spop(Region<ByteArrayWrapper, RedisSet> region, ByteArrayWrapper key, int popCount) { RedisSet redisSet = region.get(key); if (redisSet != null) { return redisSet.doSpop(region, key, popCount); } else { return emptyList(); } }
Source:
private void moveProductsSideways() { $(allCarrouselDivs).addClass(stateTransitionStyleName); $(allCarrouselDivs).addClass(stateBesideStyleName); Scheduler.get().scheduleFixedPeriod(new Scheduler.RepeatingCommand() { public boolean execute() { removeProductClasses(); return false; } }, 1250); }

Target:
private void moveProductsSideways() { toggleClass(true); Scheduler.get().scheduleFixedPeriod(new Scheduler.RepeatingCommand() { public boolean execute() { removeProductClasses(); return false; } }, animationSidewaysDuration); }
Source:
public void createPartControl(Composite parent) { fPagebook = new PageBook(parent, SWT.NULL); createInfoPage(); createViewerPage(); getSite().setSelectionProvider(new AdaptingSelectionProvider(ICElement.class, fTreeViewer)); initDragAndDrop(); createActions(); createContextMenu(); bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class); if (bindingService != null) { bindingManagerListener = new IBindingManagerListener() { @Override public void bindingManagerChanged(BindingManagerEvent event) { if (event.isActiveBindingsChanged()) { String keyBinding = bindingService.getBestActiveBindingFormattedFor(IWorkbenchCommandConstants.EDIT_DELETE); if (keyBinding != null) fRemoveFromViewAction.setText(CHMessages.CHViewPart_RemoveFromView_label + '\t'+ keyBinding); } } }; bindingService.addBindingManagerListener(bindingManagerListener); } setMessage(CHMessages.CHViewPart_emptyPageMessage); initializeActionStates(); IContextService ctxService = (IContextService) getSite().getService(IContextService.class); if (ctxService != null) { fContextActivation= ctxService.activateContext(CUIPlugin.CVIEWS_SCOPE); } PlatformUI.getWorkbench().getHelpSystem().setHelp(fPagebook, ICHelpContextIds.CALL_HIERARCHY_VIEW); addPartListener(); }

Target:
public void createPartControl(Composite parent) { fPagebook = new PageBook(parent, SWT.NULL); createInfoPage(); createViewerPage(); getSite().setSelectionProvider(new AdaptingSelectionProvider(ICElement.class, fTreeViewer)); initDragAndDrop(); createActions(); createContextMenu(); bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class); if (bindingService != null) { bindingManagerListener = new IBindingManagerListener() { @Override public void bindingManagerChanged(BindingManagerEvent event) { if (event.isActiveBindingsChanged()) { String keyBinding = bindingService.getBestActiveBindingFormattedFor(IWorkbenchCommandConstants.EDIT_DELETE); if (keyBinding != null) { fRemoveFromViewAction.setText(CHMessages.CHViewPart_RemoveFromView_label + '\t'+ keyBinding); } } } }; bindingService.addBindingManagerListener(bindingManagerListener); } setMessage(CHMessages.CHViewPart_emptyPageMessage); initializeActionStates(); IContextService ctxService = (IContextService) getSite().getService(IContextService.class); if (ctxService != null) { fContextActivation= ctxService.activateContext(CUIPlugin.CVIEWS_SCOPE); } PlatformUI.getWorkbench().getHelpSystem().setHelp(fPagebook, ICHelpContextIds.CALL_HIERARCHY_VIEW); addPartListener(); }
Source:
MouseNavigator(final StyledText styledText) { if (styledText == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } if (styledText.isDisposed()) { SWT.error(SWT.ERROR_WIDGET_DISPOSED); } parent = styledText; mouseDownListener = new Listener() { @Override public void handleEvent(Event e) { onMouseDown(e); } }; parent.addListener(SWT.MouseDown, mouseDownListener); mouseUpListener = new Listener() { @Override public void handleEvent(Event e) { onMouseUpOrExit(e); } }; parent.addListener(SWT.MouseUp, mouseUpListener); paintListener = new Listener() { @Override public void handleEvent(Event e) { onPaint(e); } }; parent.addListener(SWT.Paint, paintListener); mouseMoveListener = new Listener() { @Override public void handleEvent(Event e) { onMouseMove(e); } }; parent.addListener(SWT.MouseMove, mouseMoveListener); mouseExitListener = new Listener() { @Override public void handleEvent(Event event) { onMouseUpOrExit(event); } }; parent.addListener(SWT.MouseExit, mouseExitListener); }

Target:
MouseNavigator(final StyledText styledText) { if (styledText == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } if (styledText.isDisposed()) { SWT.error(SWT.ERROR_WIDGET_DISPOSED); } parent = styledText; mouseDownListener = (event) -> { onMouseDown(event); }; parent.addListener(SWT.MouseDown, mouseDownListener); mouseUpListener = (event) -> { onMouseUpOrExit(event); }; parent.addListener(SWT.MouseUp, mouseUpListener); paintListener = (event) -> { onPaint(event); }; parent.addListener(SWT.Paint, paintListener); mouseMoveListener = (event) -> { onMouseMove(event); }; parent.addListener(SWT.MouseMove, mouseMoveListener); mouseExitListener = (event) -> { onMouseUpOrExit(event); }; parent.addListener(SWT.MouseExit, mouseExitListener); }
Source:
public CouchDBDocument saveDocument(CouchDBDocument document) { Response response = null; try { response = databaseClient.saveDocument( document, document.getId() ); if ( response.getStatus() == Response.Status.CREATED.getStatusCode() ) { CouchDBResponse entity = response.readEntity( CouchDBResponse.class ); updateDocumentRevision( document, entity.getRev() ); } else if ( response.getStatus() == Response.Status.CONFLICT.getStatusCode() ) { throw new OptimisticLockException(); } else { CouchDBResponse entity = response.readEntity( CouchDBResponse.class ); throw logger.errorCreatingDocument( response.getStatus(), entity.getError(), entity.getReason() ); } return document; } catch (ResteasyClientException e) { throw logger.couchDBConnectionProblem( e ); } finally { if ( response != null ) { response.close(); } } }

Target:
public CouchDBDocument saveDocument(CouchDBDocument document) { return doSaveDocument( document, false ); }
Source:
static String exportGnucashXML(SQLiteDatabase db) throws IOException { Log.i(LOG_TAG, "Exporting database to GnuCash XML"); ExportParams exportParams = new ExportParams(ExportFormat.GNC_XML); exportParams.setExportAllTransactions(true); exportParams.setExportTarget(ExportParams.ExportTarget.SD_CARD); exportParams.setDeleteTransactionsAfterExport(false); new File(Environment.getExternalStorageDirectory() + "/gnucash/").mkdirs(); exportParams.setTargetFilepath(Environment.getExternalStorageDirectory() + "/gnucash/" + Exporter.buildExportFilename(ExportFormat.GNC_XML)); GncXmlExporter exporter = new GncXmlExporter(exportParams); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(exportParams.getTargetFilepath()), "UTF-8")); try { String xml = exporter.generateXML(); writer.write(xml); } catch (ParserConfigurationException e) { e.printStackTrace(); } finally { writer.flush(); writer.close(); } return exportParams.getTargetFilepath(); }

Target:
static String exportGnucashXML(SQLiteDatabase db) throws IOException { Log.i(LOG_TAG, "Exporting database to GnuCash XML"); ExportParams exportParams = new ExportParams(ExportFormat.GNC_XML); exportParams.setExportAllTransactions(true); exportParams.setExportTarget(ExportParams.ExportTarget.SD_CARD); exportParams.setDeleteTransactionsAfterExport(false); new File(Environment.getExternalStorageDirectory() + "/gnucash/").mkdirs(); exportParams.setTargetFilepath(Environment.getExternalStorageDirectory() + "/gnucash/" + Exporter.buildExportFilename(ExportFormat.GNC_XML)); GncXmlExporter exporter = new GncXmlExporter(exportParams, db); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(exportParams.getTargetFilepath()), "UTF-8")); try { String xml = exporter.generateXML(); writer.write(xml); } catch (ParserConfigurationException e) { e.printStackTrace(); } finally { writer.flush(); writer.close(); } return exportParams.getTargetFilepath(); }
Source:
public double getWalkSpeed() { return walkSpeed; }

Target:
public double getWalkSpeed() { return this.walkSpeed; }
Source:
public void setSortOrder(@Nullable Comparator<?> comparator) { if (comparator == null) { return; } fComparator = (Comparator<ISegment>) comparator; final TableViewer tableViewer = fTableViewer; if (tableViewer == null) { return; } Arrays.sort(fSegmentArray, fComparator); tableViewer.refresh(); }

Target:
public void setSortOrder(@Nullable Comparator<?> comparator) { if (comparator == null) { return; } if (fSegmentArray == null) { return; } final TableViewer tableViewer = fTableViewer; if (tableViewer == null) { return; } fComparator = (Comparator<ISegment>) comparator; Arrays.sort(fSegmentArray, fComparator); tableViewer.refresh(); }
Source:
public void setPortrait(AbstractIcon portrait) { this.portrait = portrait; }

Target:
public void setPortrait(AbstractIcon portrait) { assert (portrait != null) : "Illegal assignment: cannot have a null AbstractIcon for a Portrait"; this.portrait = Objects.requireNonNull(portrait); }
Source:
public <T> boolean register(T destroyableInstance, Binding<T> binding, Iterable<LifecycleAction> action) { try { return (running.get()) ? binding.acceptScopingVisitor(new ManagedInstanceScopingVisitor(destroyableInstance, binding.getSource(), action)) : false; } catch (Exception e) { LOGGER.warn("failed to register lifecycle actions for {}", destroyableInstance, e); return false; } }

Target:
public <T> boolean register(T destroyableInstance, Binding<T> binding, Iterable<LifecycleAction> action) { return (running.get()) ? binding.acceptScopingVisitor(new ManagedInstanceScopingVisitor(destroyableInstance, binding.getSource(), action)) : false; }
Source:
public String render(Double data) { int totalSeconds = data.intValue(); int days = totalSeconds / SECONDS_IN_A_DAY; int hours = (totalSeconds % SECONDS_IN_A_DAY) / SECONDS_IN_AN_HOUR; int minutes = (totalSeconds % SECONDS_IN_AN_HOUR) / SECONDS_IN_A_MINUTE; int seconds = totalSeconds % SECONDS_IN_A_MINUTE; String reply = ""; if (days > 0) { reply += days + (days == 1 ? " day " : " days "); } else if (hours > 0) { reply += hours + " h "; } else if (minutes > 0) { reply += minutes + " min "; } else if (seconds >= 0) { reply += seconds + " sec"; } return reply; }

Target:
public String render(Double data) { int totalSeconds = data.intValue(); int days = totalSeconds / SECONDS_IN_A_DAY; int hours = (totalSeconds % SECONDS_IN_A_DAY) / SECONDS_IN_AN_HOUR; int minutes = (totalSeconds % SECONDS_IN_AN_HOUR) / SECONDS_IN_A_MINUTE; int seconds = totalSeconds % SECONDS_IN_A_MINUTE; String reply = ""; if (days > 0) { reply += days + (days == 1 ? " day " : " days "); } else if (hours > 0) { reply += hours + " h "; } else if (minutes > 0) { reply += minutes + " min "; } else if (seconds > 0) { reply += seconds + " sec"; } return reply; }
Source:
public void validateAllSupportedCiphers() throws IOException, DecoderException { final Iterator<SupportedCipherDetails> i = CIPHERS_TO_TEST.iterator(); while (i.hasNext()) { final SupportedCipherDetails cipherDetails = i.next(); validateEncryptedFileWithHeaderValues(cipherDetails); } }

Target:
public void validateAllSupportedCiphers() throws IOException, DecoderException { for (final SupportedCipherDetails cipherDetails : CIPHERS_TO_TEST) { validateEncryptedFileWithHeaderValues(cipherDetails); } }
Source:
void addLocationIdValues(final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap) { final Map<Integer, String> instanceIdLocationIdMap = this.studyDataManager.getInstanceIdLocationIdMap(new ArrayList<>(observationUnitRowMap.keySet())); for(Integer instanceId: observationUnitRowMap.keySet()) { final List<ObservationUnitRow> observationUnitRows = observationUnitRowMap.get(instanceId); final ObservationUnitData locationIdData = new ObservationUnitData(); locationIdData.setValue(instanceIdLocationIdMap.get(instanceId)); for(ObservationUnitRow row: observationUnitRows) { row.getVariables().put(LOCATION_ID_VARIABLE_NAME, locationIdData); } } }

Target:
void addLocationIdValues(final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap) { final Map<Integer, String> instanceIdLocationIdMap = this.studyDataManager.getInstanceIdLocationIdMap(new ArrayList<>(observationUnitRowMap.keySet())); for(final Integer instanceId: observationUnitRowMap.keySet()) { final ObservationUnitData locationIdData = new ObservationUnitData(); locationIdData.setValue(instanceIdLocationIdMap.get(instanceId)); observationUnitRowMap.get(instanceId).forEach(row -> { row.getVariables().put(LOCATION_ID_VARIABLE_NAME, locationIdData); }); } }
Source:
private void collectMatchingIUs(Map<String, ?> indexToUse, String name, Collection<IInstallableUnit> collector) { Object v = indexToUse.get(name); if (v == null) return; if (v instanceof IInstallableUnit) collector.add((IInstallableUnit) v); else collector.addAll((Collection<IInstallableUnit>) v); }

Target:
private static void collectMatchingIUs(Map<String, ?> indexToUse, String name, Collection<IInstallableUnit> collector) { Object v = indexToUse.get(name); if (v == null) return; if (v instanceof IInstallableUnit) collector.add((IInstallableUnit) v); else collector.addAll((Collection<IInstallableUnit>) v); }
Source:
public String intercept(ActionInvocation invocation) throws Exception { HttpServletRequest servletRequest = invocation.getInvocationContext().getServletRequest(); HttpSession httpSession = servletRequest.getSession(false); if (httpSession == null) { LOG.debug("Creating new HttpSession and new SessionMap in ServletActionContext"); servletRequest.getSession(true); invocation.getInvocationContext().setSession(new SessionMap<>(servletRequest)); } return invocation.invoke(); }

Target:
public String intercept(ActionInvocation invocation) throws Exception { HttpServletRequest servletRequest = invocation.getInvocationContext().getServletRequest(); HttpSession httpSession = servletRequest.getSession(false); if (httpSession == null) { LOG.debug("Creating new HttpSession and new SessionMap in ServletActionContext"); servletRequest.getSession(true); invocation.getInvocationContext().withSession(new SessionMap<>(servletRequest)); } return invocation.invoke(); }
Source:
public void testList() { for (Location location : api().list()) { assertTrue(!location.id().isEmpty()); } assertTrue(!api().list().isEmpty()); }

Target:
public void testList() { assertTrue(!api().list().isEmpty()); for (Location location : api().list()) { assertTrue(!location.id().isEmpty()); checkLocation(location); } }
Source:
public boolean isTrue(State state, String[] params) { if (!params[1].equalsIgnoreCase("")) { ObjectInstance container = state.getObject(params[1]); Set<String> contents = ContainerFactory.getContentNames(container); if (contents.isEmpty()) { return false; } ObjectInstance toPeel = null; for (String name : contents) { toPeel = state.getObject(name); break; } for (IngredientRecipe content : this.topLevelIngredient.getConstituentIngredients()) { if (content.getName().equals(toPeel.getName())) { return content.getPeeled(); } } AbstractMap<String, IngredientRecipe> necessaryTraits = this.topLevelIngredient.getNecessaryTraits(); Set<String> toMeltTraits = IngredientFactory.getTraits(toPeel); for (String trait : necessaryTraits.keySet()) { if (toMeltTraits.contains(trait)) { if (necessaryTraits.get(trait).getPeeled()) { return true; } } } return false; } else { for (IngredientRecipe content : topLevelIngredient.getConstituentIngredients()) { if (content.getPeeled()) { return true; } } AbstractMap<String, IngredientRecipe> traitMap = topLevelIngredient.getConstituentNecessaryTraits(); for (String trait : traitMap.keySet()) { if (traitMap.get(trait).getPeeled()) { return true; } } return false; } }

Target:
public boolean isTrue(State state, String[] params) { if (!params[1].equalsIgnoreCase("")) { ObjectInstance container = state.getObject(params[1]); Set<String> contents = ContainerFactory.getContentNames(container); if (contents.isEmpty()) { return false; } ObjectInstance toPeel = null; for (String name : contents) { toPeel = state.getObject(name); boolean match = false; for (IngredientRecipe content : this.topLevelIngredient.getConstituentIngredients()) { if (content.getName().equals(toPeel.getName())) { if (!content.getPeeled()) { return false; } match = true; break; } } if (!match) { AbstractMap<String, IngredientRecipe> necessaryTraits = this.topLevelIngredient.getNecessaryTraits(); Set<String> toMeltTraits = IngredientFactory.getTraits(toPeel); for (String trait : necessaryTraits.keySet()) { if (toMeltTraits.contains(trait)) { if (necessaryTraits.get(trait).getPeeled()) { match = true; break; } } } if (!match) { return false; } } } return true; } else { for (IngredientRecipe content : topLevelIngredient.getConstituentIngredients()) { if (content.getPeeled()) { return true; } } AbstractMap<String, IngredientRecipe> traitMap = topLevelIngredient.getConstituentNecessaryTraits(); for (String trait : traitMap.keySet()) { if (traitMap.get(trait).getPeeled()) { return true; } } return false; } }
Source:
Mono<DecryptResult> decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, byte[] authenticationData, byte[] authenticationTag, Context context, JsonWebKey key) { throw new UnsupportedOperationException("Decrypt operaiton is not supported for EC key"); }

Target:
Mono<DecryptResult> decryptAsync(EncryptionAlgorithm algorithm, byte[] cipherText, byte[] iv, byte[] authenticationData, byte[] authenticationTag, Context context, JsonWebKey key) { throw new UnsupportedOperationException("Decrypt operation is not supported for EC key"); }
Source:
public static void main(String[] args) throws Exception { if(args.length < 1) { usage(); return; } try (BufferedReader modelReader = new BufferedReader(new FileReader(args[0]))) { String chartTitle = modelReader.readLine(); String[] series = modelReader.readLine().split(","); List<String> listLanguages = new ArrayList<>(10); List<Double> listCountries = new ArrayList<>(10); List<Double> listSpeakers = new ArrayList<>(10); String ln; while((ln = modelReader.readLine()) != null) { String[] vals = ln.split(","); listCountries.add(Double.valueOf(vals[0])); listSpeakers.add(Double.valueOf(vals[1])); listLanguages.add(vals[2]); } String[] categories = listLanguages.toArray(new String[listLanguages.size()]); Double[] values1 = listCountries.toArray(new Double[listCountries.size()]); Double[] values2 = listSpeakers.toArray(new Double[listSpeakers.size()]); try { XMLSlideShow ppt = new XMLSlideShow(); XSLFSlide slide = ppt.createSlide(); XSLFChart chart = ppt.createChart(); Rectangle2D rect2D = new java.awt.Rectangle(XDDFChart.DEFAULT_X, XDDFChart.DEFAULT_Y, 5000000, 5000000); slide.addChart(chart, rect2D); setBarData(chart, chartTitle, series, categories, values1, values2); try (OutputStream out = new FileOutputStream("bar-chart-demo-output.pptx")) { ppt.write(out); } } catch(Exception e) { e.printStackTrace(); } } System.out.println("Done"); }

Target:
public static void main(String[] args) throws Exception { if(args.length < 1) { usage(); return; } try (BufferedReader modelReader = new BufferedReader(new FileReader(args[0]))) { String chartTitle = modelReader.readLine(); String[] series = modelReader.readLine().split(","); List<String> listLanguages = new ArrayList<>(10); List<Double> listCountries = new ArrayList<>(10); List<Double> listSpeakers = new ArrayList<>(10); String ln; while((ln = modelReader.readLine()) != null) { String[] vals = ln.split(","); listCountries.add(Double.valueOf(vals[0])); listSpeakers.add(Double.valueOf(vals[1])); listLanguages.add(vals[2]); } String[] categories = listLanguages.toArray(new String[listLanguages.size()]); Double[] values1 = listCountries.toArray(new Double[listCountries.size()]); Double[] values2 = listSpeakers.toArray(new Double[listSpeakers.size()]); try { XMLSlideShow ppt = new XMLSlideShow(); XSLFSlide slide = ppt.createSlide(); XSLFChart chart = ppt.createChart(); Rectangle2D rect2D = new java.awt.Rectangle(XDDFChart.DEFAULT_X, XDDFChart.DEFAULT_Y, XDDFChart.DEFAULT_WIDTH, XDDFChart.DEFAULT_HEIGHT); slide.addChart(chart, rect2D); setBarData(chart, chartTitle, series, categories, values1, values2); try (OutputStream out = new FileOutputStream("bar-chart-demo-output.pptx")) { ppt.write(out); } } catch(Exception e) { e.printStackTrace(); } } System.out.println("Done"); }
Source:
public boolean isValid(String value, ConstraintValidatorContext ctx) { if (value == null) { return true; } for (String s:invalCategNames) { if (value.equals(s)) { return false; } } return true; }

Target:
public boolean isValid(String value, ConstraintValidatorContext ctx) { if (value == null) { return true; } for (String forbiddenValue : forbiddenValues) { if (value.equals(forbiddenValue)) { return false; } } return true; }
Source:
private void triggerWindowProcess(long upperLimit, List<RowData> inputs) throws Exception { long lowerLimit = upperLimit - lowerBoundary; List<Long> outdatedTs = new LinkedList<>(); if (inputs != null) { for (Map.Entry<Long, List<RowData>> entry : inputState.entries()) { long dataTs = entry.getKey(); if (dataTs >= lowerLimit) { if (dataTs <= upperLimit) { List<RowData> dataList = entry.getValue(); if (dataList != null) { for (RowData data : dataList) { arrowSerializer.write(getFunctionInput(data)); currentBatchCount++; } } } } else { outdatedTs.add(dataTs); } } for (Long dateTs : outdatedTs) { inputState.remove(dateTs); } inputData.add(inputs); if (currentBatchCount > 0) { arrowSerializer.finishCurrentBatch(); pythonFunctionRunner.process(baos.toByteArray()); elementCount += currentBatchCount; checkInvokeFinishBundleByCount(); currentBatchCount = 0; baos.reset(); } } }

Target:
private void triggerWindowProcess(long upperLimit, List<RowData> inputs) throws Exception { long lowerLimit = upperLimit - lowerBoundary; if (inputs != null) { Iterator<Map.Entry<Long, List<RowData>>> iter = inputState.iterator(); while (iter.hasNext()) { Map.Entry<Long, List<RowData>> entry = iter.next(); long dataTs = entry.getKey(); if (dataTs >= lowerLimit) { if (dataTs <= upperLimit) { List<RowData> dataList = entry.getValue(); for (RowData data : dataList) { arrowSerializer.write(getFunctionInput(data)); currentBatchCount++; } } } else { iter.remove(); } } inputData.add(inputs); invokeCurrentBatch(); } }
Source:
public void startProcessInstanceCmdExecutorTest() { StartProcessInstanceCmd startProcessInstanceCmd = new StartProcessInstanceCmd("x"); ProcessInstance fakeProcessInstance = new ProcessInstance("fakeId", "name", "description", "processDefinitionId", "initiator", new Date(), "businessKey", "status"); given(processEngine.startProcess(any())).willReturn(fakeProcessInstance); assertThat(startProcessInstanceCmdExecutor).isNotNull(); assertThat(startProcessInstanceCmdExecutor.getHandledType()).isEqualTo(StartProcessInstanceCmd.class); startProcessInstanceCmdExecutor.execute(startProcessInstanceCmd); verify(processEngine).startProcess(startProcessInstanceCmd); verify(commandResults).send(ArgumentMatchers.<Message<StartProcessInstanceResults>>any()); }

Target:
public void startProcessInstanceCmdExecutorTest() { StartProcessInstanceCmd startProcessInstanceCmd = new StartProcessInstanceCmd("x"); ProcessInstance fakeProcessInstance = new ProcessInstance("fakeId", "name", "description", "processDefinitionId", "initiator", new Date(), "businessKey", "status"); given(processEngine.startProcess(any())).willReturn(fakeProcessInstance); assertThat(startProcessInstanceCmdExecutor.getHandledType()).isEqualTo(StartProcessInstanceCmd.class); startProcessInstanceCmdExecutor.execute(startProcessInstanceCmd); verify(processEngine).startProcess(startProcessInstanceCmd); verify(commandResults).send(ArgumentMatchers.<Message<StartProcessInstanceResults>>any()); }
Source:
public static String methodWithTwoDuplicateStringLiterals() { return String.format("%s%s", "test", "test"); }

Target:
public String methodWithTwoDuplicateStringLiterals() { return String.format("%s%s%s", "test", "test", this.toString()); }
Source:
protected boolean validate() { Guid imageId = getParameters().getImageId(); if (!Guid.isNullOrEmpty(imageId)) { return validateImageTransfer(imageId); } else { if (getParameters().getTransferType() != TransferType.Download) { return validateCreateImage(); } else { return failValidation(EngineMessage.ACTION_TYPE_FAILED_IMAGE_NOT_SPECIFIED_FOR_DOWNLOAD); } } }

Target:
protected boolean validate() { Guid imageId = getParameters().getImageId(); if (!Guid.isNullOrEmpty(imageId)) { return validateImageTransfer(imageId); } else if (getParameters().getTransferType() == TransferType.Download) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_IMAGE_NOT_SPECIFIED_FOR_DOWNLOAD); } return validateCreateImage(); }
Source:
public void run() { try { cloudFile.upload(TestDataCreationHelper.createRandomInputStream(options.getSize()), options.getSize()); } catch (StorageException | URISyntaxException | IOException e) { throw new RuntimeException(e); } }

Target:
public void run() { try { inputStream.reset(); cloudFile.upload(inputStream, options.getSize()); } catch (StorageException | URISyntaxException | IOException e) { throw new RuntimeException(e); } }