auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public ReserveVmInterfaceVspCommand(String nicUuid, String nicMacAddress, String networkUuid, boolean isL3Network, boolean isSharedNetwork, String vpcUuid, String networkDomainUuid, String networksAccountUuid, boolean isDomainRouter, String domainRouterIp, String vmInstanceName, String vmUuid, String vmUserName, String vmUserDomainName, boolean useStaticIp, String staticIp, String staticNatIpUuid, String staticNatIpAddress, boolean isStaticNatIpAllocated, boolean isOneToOneNat, String staticNatVlanUuid, String staticNatVlanGateway, String staticNatVlanNetmask) { super(); this._nicUuid = nicUuid; this._nicMacAddress = nicMacAddress; this._networkUuid = networkUuid; this._isL3Network = isL3Network; this._isSharedNetwork = isSharedNetwork; this._vpcUuid = vpcUuid; this._networkDomainUuid = networkDomainUuid; this._networksAccountUuid = networksAccountUuid; this._isDomainRouter = isDomainRouter; this._domainRouterIp = domainRouterIp; this._vmInstanceName = vmInstanceName; this._vmUuid = vmUuid; this._vmUserName = vmUserName; this._vmUserDomainName = vmUserDomainName; this._useStaticIp = useStaticIp; this._staticIp = staticIp; this._staticNatIpUuid = staticNatIpUuid; this._staticNatIpAddress = staticNatIpAddress; this._isStaticNatIpAllocated = isStaticNatIpAllocated; this._isOneToOneNat = isOneToOneNat; this._staticNatVlanUuid = staticNatVlanUuid; this._staticNatVlanGateway = staticNatVlanGateway; this._staticNatVlanNetmask = staticNatVlanNetmask; }

Target:
private ReserveVmInterfaceVspCommand(String nicUuid, String nicMacAddress, String networkUuid, boolean isL3Network, boolean isSharedNetwork, String vpcUuid, String networkDomainUuid, String networksAccountUuid, boolean isDomainRouter, String domainRouterIp, String vmInstanceName, String vmUuid, String vmUserName, String vmUserDomainName, boolean useStaticIp, String staticIp, String staticNatIpUuid, String staticNatIpAddress, boolean isStaticNatIpAllocated, boolean isOneToOneNat, String staticNatVlanUuid, String staticNatVlanGateway, String staticNatVlanNetmask) { super(); this._nicUuid = nicUuid; this._nicMacAddress = nicMacAddress; this._networkUuid = networkUuid; this._isL3Network = isL3Network; this._isSharedNetwork = isSharedNetwork; this._vpcUuid = vpcUuid; this._networkDomainUuid = networkDomainUuid; this._networksAccountUuid = networksAccountUuid; this._isDomainRouter = isDomainRouter; this._domainRouterIp = domainRouterIp; this._vmInstanceName = vmInstanceName; this._vmUuid = vmUuid; this._vmUserName = vmUserName; this._vmUserDomainName = vmUserDomainName; this._useStaticIp = useStaticIp; this._staticIp = staticIp; this._staticNatIpUuid = staticNatIpUuid; this._staticNatIpAddress = staticNatIpAddress; this._isStaticNatIpAllocated = isStaticNatIpAllocated; this._isOneToOneNat = isOneToOneNat; this._staticNatVlanUuid = staticNatVlanUuid; this._staticNatVlanGateway = staticNatVlanGateway; this._staticNatVlanNetmask = staticNatVlanNetmask; }
Source:
void mkfile(final OpenMode openMode, final String path, final MainFragment ma) { mk(R.string.newfile, (dialog, which) -> { EditText textfield = dialog.getCustomView().findViewById(R.id.singleedittext_input); mkFile(new HybridFile(openMode, path + "/" + textfield.getText().toString()), ma); dialog.dismiss(); }, (text) -> { boolean isValidFilename = Utils.isValidFilename(text); if (isValidFilename && text.length() > 0 && !text.toLowerCase().endsWith(".txt")) { return new WarnableTextInputValidator.ReturnState( WarnableTextInputValidator.ReturnState.STATE_WARNING, R.string.create_file_suggest_txt_extension); } else { if (!isValidFilename) { return new WarnableTextInputValidator.ReturnState( WarnableTextInputValidator.ReturnState.STATE_ERROR, R.string.invalid_name); } else if (text.length() < 1) { return new WarnableTextInputValidator.ReturnState( WarnableTextInputValidator.ReturnState.STATE_ERROR, R.string.field_empty); } } return new WarnableTextInputValidator.ReturnState(); }); }

Target:
void mkfile(final OpenMode openMode, final String path, final MainFragment ma) { mk(R.string.newfile, ".txt", (dialog, which) -> { EditText textfield = dialog.getCustomView().findViewById(R.id.singleedittext_input); mkFile(new HybridFile(openMode, path + "/" + textfield.getText().toString()), ma); dialog.dismiss(); }, (text) -> { boolean isValidFilename = FileUtil.isValidFilename(text); if (isValidFilename && text.length() > 0 && !text.toLowerCase().endsWith(".txt")) { return new WarnableTextInputValidator.ReturnState( WarnableTextInputValidator.ReturnState.STATE_WARNING, R.string.create_file_suggest_txt_extension); } else { if (!isValidFilename) { return new WarnableTextInputValidator.ReturnState( WarnableTextInputValidator.ReturnState.STATE_ERROR, R.string.invalid_name); } else if (text.length() < 1) { return new WarnableTextInputValidator.ReturnState( WarnableTextInputValidator.ReturnState.STATE_ERROR, R.string.field_empty); } } return new WarnableTextInputValidator.ReturnState(); }); }
Source:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SplittingBAMIndex that = (SplittingBAMIndex) o; return !(virtualOffsets != null ? !virtualOffsets.equals(that.virtualOffsets) : that .virtualOffsets != null); }

Target:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SplittingBAMIndex that = (SplittingBAMIndex) o; return virtualOffsets != null ? virtualOffsets.equals(that.virtualOffsets) : that .virtualOffsets == null; }
Source:
private static IPath decodePath(String str) { if (null == str) { return Path.fromPortableString(decode(str)); } else switch (str) { case "#": return null; case "&": return Path.EMPTY; default: return Path.fromPortableString(decode(str)); } }

Target:
private static IPath decodePath(String str) { if (str == null) return Path.fromPortableString(""); switch (str) { case "#": return null; case "&": return Path.EMPTY; default: return Path.fromPortableString(decode(str)); } }
Source:
protected void joinRows(Map<String, Object> row) { Map<String, Object> join = new HashMap<String, Object>(); if (row != null) { for (Index index : table1Columns) { index.filter(row, join); } } outport.emit(join); }

Target:
protected void joinRows(Map<String, Object> row) { Map<String, Object> join = new HashMap<>(); if (row != null) { for (Index index : table1Columns) { index.filter(row, join); } } outport.emit(join); }
Source:
public boolean equals(Object o) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } CacheKey cacheKey = (CacheKey) o; if ( annotationDescriptor != null ? !annotationDescriptor.equals( cacheKey.annotationDescriptor ) : cacheKey.annotationDescriptor != null ) { return false; } if ( constraintFactory != null ? !constraintFactory.equals( cacheKey.constraintFactory ) : cacheKey.constraintFactory != null ) { return false; } if ( validatedType != null ? !validatedType.equals( cacheKey.validatedType ) : cacheKey.validatedType != null ) { return false; } return true; }

Target:
public boolean equals(Object o) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } CacheKey cacheKey = (CacheKey) o; if ( !annotationDescriptor.equals( cacheKey.annotationDescriptor ) ) { return false; } if ( !validatedType.equals( cacheKey.validatedType ) ) { return false; } if ( !constraintValidatorFactory.equals( cacheKey.constraintValidatorFactory ) ) { return false; } return true; }
Source:
public synchronized void tryToRefreshSessionCookie( ){ if ( task == null || task.isCancelled() ) { task =new GetSessesionExchangeCookieTask(MainApplication.instance()) { @Override public void onSuccess(List<HttpCookie> result) { if (result == null || result.isEmpty()) { logger.debug("result is empty"); EventBus.getDefault().post(new SessionIdRefreshEvent(false)); return; } long currentTime = new Date().getTime(); for (HttpCookie cookie : result) { if (cookie.getName().equals(PrefManager.Key.SESSION_ID)) { clearWebWiewCookie(context); PrefManager pref = new PrefManager(MainApplication.instance(), PrefManager.Pref.LOGIN); pref.put(PrefManager.Key.AUTH_ASSESSMENT_SESSION_ID, cookie.getValue()); EventBus.getDefault().post(new SessionIdRefreshEvent(true)); break; } } task = null; } @Override public void onException(Exception ex) { logger.error(ex); EventBus.getDefault().post(new SessionIdRefreshEvent(false)); task = null; } }; task.execute(); } }

Target:
public synchronized void tryToRefreshSessionCookie( ){ if ( task == null || task.isCancelled() ) { task =new GetSessesionExchangeCookieTask(MainApplication.instance()) { @Override public void onSuccess(List<HttpCookie> result) { if (result == null || result.isEmpty()) { logger.debug("result is empty"); EventBus.getDefault().post(new SessionIdRefreshEvent(false)); return; } for (HttpCookie cookie : result) { if (cookie.getName().equals(PrefManager.Key.SESSION_ID)) { clearWebWiewCookie(context); PrefManager pref = new PrefManager(MainApplication.instance(), PrefManager.Pref.LOGIN); pref.put(PrefManager.Key.AUTH_ASSESSMENT_SESSION_ID, cookie.getValue()); EventBus.getDefault().post(new SessionIdRefreshEvent(true)); break; } } task = null; } @Override public void onException(Exception ex) { logger.error(ex); EventBus.getDefault().post(new SessionIdRefreshEvent(false)); task = null; } }; task.execute(); } }
Source:
public ExpiringAuthenticationStore(SpnegoAuthentication authentication) { this.authentication = authentication; results = CacheBuilder.newBuilder() .concurrencyLevel(CONCURRENCY_LEVEL) .maximumSize(CACHE_SIZE) .expireAfterWrite(CACHE_EXPIRE_TIME.roundTo(TimeUnit.MINUTES), TimeUnit.MINUTES).build(); }

Target:
public ExpiringAuthenticationStore(SpnegoAuthentication authentication) { requireNonNull(authentication, "authentication is null"); this.authentication = authentication; results = CacheBuilder.newBuilder() .concurrencyLevel(CONCURRENCY_LEVEL) .maximumSize(CACHE_SIZE) .expireAfterWrite(CACHE_EXPIRE_TIME.roundTo(TimeUnit.MINUTES), TimeUnit.MINUTES).build(); }
Source:
private void addSegment(final DruidServerMetadata server, final DataSegment segment) { synchronized (lock) { final Map<DataSegment, SegmentMetadataHolder> knownSegments = segmentMetadataInfo.get(segment.getDataSource()); if (knownSegments == null || !knownSegments.containsKey(segment)) { final long isRealtime = server.segmentReplicatable() ? 0 : 1; final long isPublished = server.getType().toString().equals(ServerType.HISTORICAL.toString()) ? 1 : 0; SegmentMetadataHolder holder = new SegmentMetadataHolder(null, isPublished, 1, isRealtime, 1, null); setSegmentSignature(segment, holder); segmentsNeedingRefresh.add(segment); if (!server.segmentReplicatable()) { log.debug("Added new mutable segment[%s].", segment.getIdentifier()); mutableSegments.add(segment); } else { log.debug("Added new immutable segment[%s].", segment.getIdentifier()); } } else { if (knownSegments != null && knownSegments.containsKey(segment)) { SegmentMetadataHolder holder = knownSegments.get(segment); holder.setNumReplicas(holder.getNumReplicas() + 1); } if (server.segmentReplicatable()) { mutableSegments.remove(segment); log.debug("Segment[%s] has become immutable.", segment.getIdentifier()); } } if (!tables.containsKey(segment.getDataSource())) { refreshImmediately = true; } lock.notifyAll(); } }

Target:
private void addSegment(final DruidServerMetadata server, final DataSegment segment) { synchronized (lock) { final Map<DataSegment, SegmentMetadataHolder> knownSegments = segmentMetadataInfo.get(segment.getDataSource()); if (knownSegments == null || !knownSegments.containsKey(segment)) { final long isRealtime = server.segmentReplicatable() ? 0 : 1; final long isPublished = server.getType() == ServerType.HISTORICAL ? 1 : 0; SegmentMetadataHolder holder = new SegmentMetadataHolder.Builder(isPublished, 1, isRealtime, 1).build(); setSegmentSignature(segment, holder); segmentsNeedingRefresh.add(segment); if (!server.segmentReplicatable()) { log.debug("Added new mutable segment[%s].", segment.getIdentifier()); mutableSegments.add(segment); } else { log.debug("Added new immutable segment[%s].", segment.getIdentifier()); } } else { if (knownSegments.containsKey(segment)) { SegmentMetadataHolder holder = knownSegments.get(segment); SegmentMetadataHolder holderWithNumReplicas = new SegmentMetadataHolder.Builder( holder.isPublished(), holder.isAvailable(), holder.isRealtime(), holder.getNumReplicas() ).withNumReplicas(holder.getNumReplicas() + 1).build(); knownSegments.put(segment, holderWithNumReplicas); } if (server.segmentReplicatable()) { mutableSegments.remove(segment); log.debug("Segment[%s] has become immutable.", segment.getIdentifier()); } } if (!tables.containsKey(segment.getDataSource())) { refreshImmediately = true; } lock.notifyAll(); } }
Source:
private static void encodeTlvs(List<HAProxyTLV> haProxyTLVs, ByteBuf out) { for (HAProxyTLV tlv: haProxyTLVs) { encodeTlv(tlv, out); } }

Target:
private static void encodeTlvs(List<HAProxyTLV> haProxyTLVs, ByteBuf out) { for (int i = 0; i < haProxyTLVs.size(); i++) { encodeTlv(haProxyTLVs.get(i), out); } }
Source:
public void serializeType() { String json = "{\"description\":\"Returns the type of o as a string ('string', 'date', 'number', 'array', 'boolean', 'error' or a class name)\",\"params\":\"object o\",\"returns\":\"string\"}"; TestUtils.isSerializedTo(new Type(), json); }

Target:
public void serializeType() { String json = "{\"description\":\"Returns the type of o as a string ('string', 'date', 'number', 'array', 'boolean' or a class name)\",\"params\":\"object o\",\"returns\":\"string\"}"; TestUtils.isSerializedTo(new Type(), json); }
Source:
public EEFRadioLifecycleManager(EEFRadioDescription description, IVariableManager variableManager, IInterpreter interpreter, TransactionalEditingDomain editingDomain) { super(description, variableManager, interpreter, editingDomain); this.description = description; }

Target:
public EEFRadioLifecycleManager(EEFRadioDescription description, IVariableManager variableManager, IInterpreter interpreter, TransactionalEditingDomain editingDomain) { super(variableManager, interpreter, editingDomain); this.description = description; }
Source:
private static void findDirtyFiles(@NotNull String filePath, @NotNull GraphGenerator<String> dependenciesGraph, @NotNull Set<String> dirtyFiles) { if (dirtyFiles.contains(filePath)) return; dirtyFiles.add(filePath); Iterator<String> childIterator = dependenciesGraph.getOut(filePath); while (childIterator.hasNext()) { findDirtyFiles(childIterator.next(), dependenciesGraph, dirtyFiles); } }

Target:
private static void findDirtyFiles(@NotNull String filePath, @NotNull GraphGenerator<String> dependenciesGraph, @NotNull Set<String> dirtyFiles) { if (dirtyFiles.contains(filePath)) return; dirtyFiles.add(filePath); Iterator<String> dependentFilesIterator = dependenciesGraph.getOut(filePath); while (dependentFilesIterator.hasNext()) { findDirtyFiles(dependentFilesIterator.next(), dependenciesGraph, dirtyFiles); } }
Source:
public boolean isStaticResourceRequest(HttpServletRequest request) { URL resource; String requestFilename = getRequestFilename(request); if (requestFilename.endsWith("/")) { return false; } if (themeFolder.matcher(requestFilename).find() || requestFilename.startsWith("/" + VAADIN_STATIC_FILES_PATH) || requestFilename.startsWith("/" + VAADIN_BUILD_FILES_PATH)) { return true; } resource = servletService.getStaticResource(requestFilename); if (resource == null && shouldFixIncorrectWebjarPaths() && isIncorrectWebjarPath(requestFilename)) { return true; } return resource != null; }

Target:
public boolean isStaticResourceRequest(HttpServletRequest request) { URL resource; String requestFilename = getRequestFilename(request); if (requestFilename.endsWith("/")) { return false; } if (APP_THEME_PATTERN.matcher(requestFilename).find() || requestFilename .startsWith("/" + VAADIN_STATIC_FILES_PATH) || requestFilename .startsWith("/" + VAADIN_BUILD_FILES_PATH)) { return true; } resource = servletService.getStaticResource(requestFilename); if (resource == null && shouldFixIncorrectWebjarPaths() && isIncorrectWebjarPath(requestFilename)) { return true; } return resource != null; }
Source:
public Mono<TableEntity> getEntity(String partitionKey, String rowKey) { return getEntityWithResponse(partitionKey, rowKey, null).flatMap(response -> Mono.justOrEmpty(response.getValue())); }

Target:
public Mono<TableEntity> getEntity(String partitionKey, String rowKey) { return getEntityWithResponse(partitionKey, rowKey, null).flatMap(FluxUtil::toMono); }
Source:
private void testAdditional() { if (networked) { throw new RuntimeException("testAdditional() is not allowed in networked mode"); } addTest(new TestMVTableEngine()); addTest(new TestAutoReconnect()); addTest(new TestBnf()); addTest(new TestCache()); addTest(new TestCollation()); addTest(new TestCompress()); addTest(new TestConnectionInfo()); addTest(new TestExit()); addTest(new TestFileLock()); addTest(new TestJmx()); addTest(new TestModifyOnWrite()); addTest(new TestOldVersion()); addTest(new TestMultiThreadedKernel()); addTest(new TestPageStore()); addTest(new TestPageStoreCoverage()); addTest(new TestPgServer()); addTest(new TestRecovery()); addTest(new RecoverLobTest()); addTest(createTest("org.h2.test.unit.TestServlet")); addTest(new TestTimeStampWithTimeZone()); addTest(new TestUpgrade()); addTest(new TestUsingIndex()); addTest(new TestValue()); addTest(new TestWeb()); runAddedTests(); addTest(new TestCluster()); addTest(new TestFileLockSerialized()); addTest(new TestFileLockProcess()); addTest(new TestDefrag()); addTest(new TestTools()); addTest(new TestIgnoreCatalogs()); addTest(new TestSampleApps()); addTest(new TestSubqueryPerformanceOnLazyExecutionMode()); runAddedTests(1); }

Target:
private void testAdditional() { if (networked) { throw new RuntimeException("testAdditional() is not allowed in networked mode"); } addTest(new TestMVTableEngine()); addTest(new TestAutoReconnect()); addTest(new TestBnf()); addTest(new TestCache()); addTest(new TestCollation()); addTest(new TestCompress()); addTest(new TestConnectionInfo()); addTest(new TestExit()); addTest(new TestFileLock()); addTest(new TestJmx()); addTest(new TestModifyOnWrite()); addTest(new TestOldVersion()); addTest(new TestMultiThreadedKernel()); addTest(new TestPageStore()); addTest(new TestPageStoreCoverage()); addTest(new TestPgServer()); addTest(new TestRecovery()); addTest(new RecoverLobTest()); addTest(createTest("org.h2.test.unit.TestServlet")); addTest(new TestTimeStampWithTimeZone()); addTest(new TestUpgrade()); addTest(new TestUsingIndex()); addTest(new TestValue()); addTest(new TestWeb()); runAddedTests(); addTest(new TestCluster()); addTest(new TestFileLockSerialized()); addTest(new TestFileLockProcess()); addTest(new TestDefrag()); addTest(new TestTools()); addTest(new TestSampleApps()); addTest(new TestSubqueryPerformanceOnLazyExecutionMode()); runAddedTests(1); }
Source:
public void constructors3() throws Exception { InputStream is = new ByteArrayInputStream("<xonfiguration><property name=\"key1\" value=\"val1\"/></xonfiguration>".getBytes()); Configuration conf = new Configuration(false); ConfigurationUtils.load(conf, is); assertEquals(conf.get("key1"), "val1"); }

Target:
public void constructors3() throws Exception { InputStream is = new ByteArrayInputStream( "<xxx><property name=\"key1\" value=\"val1\"/></xxx>".getBytes()); Configuration conf = new Configuration(false); ConfigurationUtils.load(conf, is); assertEquals("val1", conf.get("key1")); }
Source:
public void focusFrame(VControl control) { candybean.log.info("Focusing to frame by control: " + control.toString()); this.getWd().switchTo().frame(control.getWe()); }

Target:
public void focusFrame(VControl control) { candybean.log.info("Focusing to frame by control: " + control.toString()); this.wd.switchTo().frame(control.getWe()); }
Source:
public void testMemoryUsageInTheContextOfMemorySegmentAllocation() { final int bufferSize = 128; final int numBuffers = 10; NetworkBufferPool globalPool = new NetworkBufferPool(numBuffers, bufferSize); assertThat(globalPool.getTotalNumberOfMemorySegments(), is(numBuffers)); assertThat(globalPool.getNumberOfAvailableMemorySegments(), is(numBuffers)); assertThat(globalPool.getNumberOfUsedMemorySegments(), is(0)); assertThat(globalPool.getTotalMemory(), is((long) numBuffers * bufferSize)); assertThat(globalPool.getAvailableMemory(), is((long) numBuffers * bufferSize)); assertThat(globalPool.getUsedMemory(), is(0L)); assertThat(globalPool.getNumberOfRegisteredBufferPools(), is(0)); MemorySegment segment = globalPool.requestMemorySegment(); assertThat(segment, is(notNullValue())); assertThat(globalPool.getTotalNumberOfMemorySegments(), is(numBuffers)); assertThat(globalPool.getNumberOfAvailableMemorySegments(), is(numBuffers - 1)); assertThat(globalPool.getNumberOfUsedMemorySegments(), is(1)); assertThat(globalPool.getTotalMemory(), is((long) numBuffers * bufferSize)); assertThat(globalPool.getAvailableMemory(), is((long) (numBuffers - 1) * bufferSize)); assertThat(globalPool.getUsedMemory(), is((long) bufferSize)); assertThat(globalPool.getNumberOfRegisteredBufferPools(), is(0)); }

Target:
public void testMemoryUsageInTheContextOfMemorySegmentAllocation() { final int bufferSize = 128; final int numBuffers = 10; NetworkBufferPool globalPool = new NetworkBufferPool(numBuffers, bufferSize); MemorySegment segment = globalPool.requestMemorySegment(); assertThat(segment, is(notNullValue())); assertThat(globalPool.getTotalNumberOfMemorySegments(), is(numBuffers)); assertThat(globalPool.getNumberOfAvailableMemorySegments(), is(numBuffers - 1)); assertThat(globalPool.getNumberOfUsedMemorySegments(), is(1)); assertThat(globalPool.getTotalMemory(), is((long) numBuffers * bufferSize)); assertThat(globalPool.getAvailableMemory(), is((long) (numBuffers - 1) * bufferSize)); assertThat(globalPool.getUsedMemory(), is((long) bufferSize)); }
Source:
private static String getVUSOncogenicSummary(Alteration alteration) { List<Evidence> evidences = EvidenceUtils.getEvidence(Collections.singletonList(alteration), Collections.singleton(EvidenceType.VUS), null); String summary = "there was no available functional data about the " + getGeneMutationNameInVariantSummary(alteration.getGene(), alteration.getAlteration()) + "."; Date lastEdit = null; for (Evidence evidence : evidences) { if (evidence.getLastEdit() == null) { continue; } if (lastEdit == null) { lastEdit = evidence.getLastEdit(); } else if (lastEdit.compareTo(evidence.getLastEdit()) < 0) { lastEdit = evidence.getLastEdit(); } } if (lastEdit != null) { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); summary = "as of " + sdf.format(lastEdit) + ", " + summary; } return summary.substring(0, 1).toUpperCase() + summary.substring(1); }

Target:
private static String getVUSOncogenicSummary(Alteration alteration) { List<Evidence> evidences = EvidenceUtils.getEvidence(Collections.singletonList(alteration), Collections.singleton(EvidenceType.VUS), null); String summary = "there was no available functional data about the " + getGeneMutationNameInVariantSummary(alteration.getGene(), alteration.getAlteration()) + "."; Date lastEdit = null; for (Evidence evidence : evidences) { if (evidence.getLastEdit() == null) { continue; } if (lastEdit == null) { lastEdit = evidence.getLastEdit(); } else if (lastEdit.compareTo(evidence.getLastEdit()) < 0) { lastEdit = evidence.getLastEdit(); } } if (lastEdit != null) { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); summary = "as of " + sdf.format(lastEdit) + ", " + summary; } return StringUtils.capitalize(summary); }
Source:
public List<BattleStep> createSteps() { final List<BattleStep> steps = new ArrayList<>(); final List<FiringGroup> firingGroups = firingGroupSplitter.apply(battleState).stream() .sorted( Comparator.comparing(FiringGroup::getDisplayName) .thenComparing(FiringGroup::isSuicideOnHit)) .collect(Collectors.toList()); for (final FiringGroup firingGroup : firingGroups) { final FireRoundState fireRoundState = new FireRoundState(); steps.add(new RollDice(battleState, side, firingGroup, fireRoundState, diceRoller)); steps.add( new SelectCasualties(battleState, side, firingGroup, fireRoundState, casualtySelector)); steps.add( new MarkCasualties( battleState, battleActions, side, firingGroup, fireRoundState, returnFire)); } return steps; }

Target:
public List<BattleStep> createSteps() { return firingGroupSplitter.apply(battleState).stream() .sorted( Comparator.comparing(FiringGroup::getDisplayName) .thenComparing(FiringGroup::isSuicideOnHit)) .map( firingGroup -> { final FireRoundState fireRoundState = new FireRoundState(); return List.of( new RollDiceStep(battleState, side, firingGroup, fireRoundState, diceRoller), new SelectCasualties( battleState, side, firingGroup, fireRoundState, casualtySelector), new MarkCasualties( battleState, battleActions, side, firingGroup, fireRoundState, returnFire)); }) .flatMap(Collection::stream) .collect(Collectors.toList()); }
Source:
public static CommandRequest newCommandRequest(UserId userId, Message command) { final CommandContext context = getCommandContext(userId); final CommandRequest.Builder request = CommandRequest.newBuilder() .setCommand(Messages.toAny(command)) .setContext(context); return request.build(); }

Target:
public static CommandRequest newCommandRequest(UserId userId, Message command) { final CommandContext context = getCommandContext(userId); final CommandRequest request = Commands.newCommandRequest(command, context); return request; }
Source:
public static DistributedQueryRunner createMaterializingQueryRunner(Iterable<TpchTable<?>> tables) throws Exception { return createQueryRunner( tables, ImmutableMap.<String, String>builder() .put("query.partitioning-provider-catalog", "hive") .put("query.exchange-materialization-strategy", "ALL") .put("query.hash-partition-count", "11") .put("colocated-joins-enabled", "true") .put("grouped-execution-for-aggregation-enabled", "true") .put("experimental.table-writer-merge-operator-enabled", "true") .put("task.writer-count", "2") .build(), Optional.empty()); }

Target:
public static DistributedQueryRunner createMaterializingQueryRunner(Iterable<TpchTable<?>> tables) throws Exception { return createQueryRunner( tables, ImmutableMap.of( "query.partitioning-provider-catalog", "hive", "query.exchange-materialization-strategy", "ALL", "query.hash-partition-count", "11", "colocated-joins-enabled", "true", "grouped-execution-for-aggregation-enabled", "true"), Optional.empty()); }
Source:
public void stop(BundleContext context) { if (log.isDebugEnabled()) { log.debug("BPMN-Explorer Bundle Started."); } }

Target:
public void stop(BundleContext context) { log.debug("BPMN-Explorer Bundle Stopped."); }
Source:
protected void readSecretFile(String secretFile) { log.debug("reading secret file: " + secretFile); BufferedReader in = null; try { in = new BufferedReader(new FileReader(secretFile)); StringBuilder tmpPassphrase = new StringBuilder(); String line = null; while ((line = in.readLine()) != null) { log.debug("str passphrase: " + line); tmpPassphrase.append(line); } log.debug("tmpPassphrase: " + tmpPassphrase.toString()); passphrase = tmpPassphrase.toString(); } catch (FileNotFoundException e) { log.debug("File not found: " + secretFile); passphrase = null; } catch (IOException e) { log.debug("IOException while reading: " + secretFile); passphrase = null; } finally { if (in != null) { try { in.close(); } catch (IOException ioe) { } } } log.debug("Using katello-passwd passphrase: " + passphrase); }

Target:
protected void readSecretFile(String secretFile) { log.debug("reading secret file: " + secretFile); BufferedReader in = null; try { in = new BufferedReader(new FileReader(secretFile)); StringBuilder tmpPassphrase = new StringBuilder(); String line = null; while ((line = in.readLine()) != null) { tmpPassphrase.append(line); } passphrase = tmpPassphrase.toString(); } catch (FileNotFoundException e) { log.debug("File not found: " + secretFile); passphrase = null; } catch (IOException e) { log.debug("IOException while reading: " + secretFile); passphrase = null; } finally { if (in != null) { try { in.close(); } catch (IOException ioe) { } } } }
Source:
public void checkStopStartWorkspaceTest() { projectExplorer.waitProjectExplorer(); terminal.waitTerminalTab(EXPECTED_MESS_IN_CONSOLE_SEC); menu.waitMenuItemIsEnabled(PROFILE_MENU); menu.runCommand(WORKSPACE, STOP_WORKSPACE); toastLoader.waitExpectedTextInToastLoader("Workspace is not running"); toastLoader.clickOnStartButton(); projectExplorer.waitProjectExplorer(); terminal.waitTerminalTab(EXPECTED_MESS_IN_CONSOLE_SEC); menu.waitMenuItemIsEnabled(PROFILE_MENU); }

Target:
public void checkStopStartWorkspaceTest() { ide.waitOpenedWorkspaceIsReadyToUse(); menu.runCommand(WORKSPACE, STOP_WORKSPACE); toastLoader.waitExpectedTextInToastLoader("Workspace is not running"); toastLoader.clickOnStartButton(); ide.waitOpenedWorkspaceIsReadyToUse(); }
Source:
public void deleteAttribute(String name, String attName) throws EntityNotFoundException { Product product = null; try { product = productManager.load(name); } catch (EntityNotFoundException e) { log.warning("The product: " + name + " is not in the database"); throw new APIException(new EntityNotFoundException(Product.class,name, e)); } try { product.deleteAttribute(attName); productManager.update(product); } catch (Exception e) { log.warning("Attribute not found : " + attName); throw new APIException(new EntityNotFoundException(Metadata.class, "Attribute not found : " + attName, attName)); } }

Target:
public void deleteAttribute(String name, String attName) throws APIException { Product product = null; try { product = productManager.load(name); } catch (EntityNotFoundException e) { log.warning("The product: " + name + " is not in the database"); throw new APIException(new EntityNotFoundException(Product.class,name, e)); } try { product.deleteAttribute(attName); productManager.update(product); } catch (Exception e) { log.warning("Attribute not found : " + attName); throw new APIException(new EntityNotFoundException(Metadata.class, "Attribute not found : " + attName, attName)); } }
Source:
public AdjacentListConcurrentMapDAG() { this.adjacent = new ConcurrentHashMap<>(); this.inDegrees = new HashMap<>(); this.rootVertices = new HashSet<>(); this.numVertices = 0; this.numEdges = 0; }

Target:
public AdjacentListConcurrentMapDAG() { this.adjacent = new ConcurrentHashMap<>(); this.inDegrees = new ConcurrentHashMap<>(); this.numVertices = 0; this.numEdges = 0; }
Source:
public WorkflowInstanceDao(SQLVariants sqlVariants, @NFlow JdbcTemplate nflowJdbcTemplate, @NFlow TransactionTemplate transactionTemplate, @NFlow NamedParameterJdbcTemplate nflowNamedParameterJdbcTemplate, ExecutorDao executorDao, WorkflowInstanceExecutor workflowInstanceExecutor, WorkflowInstanceFactory workflowInstanceFactory, Environment env) { this.sqlVariants = sqlVariants; this.jdbc = nflowJdbcTemplate; this.transaction = transactionTemplate; this.namedJdbc = nflowNamedParameterJdbcTemplate; this.executorInfo = executorDao; this.workflowInstanceExecutor = workflowInstanceExecutor; this.workflowInstanceFactory = workflowInstanceFactory; workflowInstanceQueryMaxResults = env.getRequiredProperty("nflow.workflow.instance.query.max.results", Long.class); workflowInstanceQueryMaxResultsDefault = env.getRequiredProperty("nflow.workflow.instance.query.max.results.default", Long.class); workflowInstanceQueryMaxActions = env.getRequiredProperty("nflow.workflow.instance.query.max.actions", Long.class); workflowInstanceQueryMaxActionsDefault = env.getRequiredProperty("nflow.workflow.instance.query.max.actions.default", Long.class); instanceStateTextLength = env.getProperty("nflow.workflow.instance.state.text.length", Integer.class, -1); actionStateTextLength = env.getProperty("nflow.workflow.action.state.text.length", Integer.class, -1); disableBatchUpdates = env.getProperty("nflow.db.disable_batch_updates", Boolean.class); if (disableBatchUpdates) { logger.info("nFlow DB batch updates are disabled (system property nflow.db.disable_batch_updates=true)"); } }

Target:
public WorkflowInstanceDao(SQLVariants sqlVariants, @NFlow JdbcTemplate nflowJdbcTemplate, @NFlow TransactionTemplate transactionTemplate, @NFlow NamedParameterJdbcTemplate nflowNamedParameterJdbcTemplate, ExecutorDao executorDao, WorkflowInstanceExecutor workflowInstanceExecutor, WorkflowInstanceFactory workflowInstanceFactory, Environment env) { this.sqlVariants = sqlVariants; this.jdbc = nflowJdbcTemplate; this.transaction = transactionTemplate; this.namedJdbc = nflowNamedParameterJdbcTemplate; this.executorInfo = executorDao; this.workflowInstanceExecutor = workflowInstanceExecutor; this.workflowInstanceFactory = workflowInstanceFactory; workflowInstanceQueryMaxResults = env.getRequiredProperty("nflow.workflow.instance.query.max.results", Long.class); workflowInstanceQueryMaxResultsDefault = env.getRequiredProperty("nflow.workflow.instance.query.max.results.default", Long.class); workflowInstanceQueryMaxActions = env.getRequiredProperty("nflow.workflow.instance.query.max.actions", Long.class); workflowInstanceQueryMaxActionsDefault = env.getRequiredProperty("nflow.workflow.instance.query.max.actions.default", Long.class); disableBatchUpdates = env.getRequiredProperty("nflow.db.disable_batch_updates", Boolean.class); if (disableBatchUpdates) { logger.info("nFlow DB batch updates are disabled (system property nflow.db.disable_batch_updates=true)"); } instanceStateTextLength = env.getProperty("nflow.workflow.instance.state.text.length", Integer.class, -1); actionStateTextLength = env.getProperty("nflow.workflow.action.state.text.length", Integer.class, -1); }
Source:
public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) { ITimeGraphEntry entry = event.getEntry(); if (event instanceof TimeEvent && ((TimeEvent) event).hasValue() && entry instanceof TimeGraphEntry) { ITmfTreeDataModel model = ((TimeGraphEntry) entry).getEntryModel(); ITimeGraphDataProvider<? extends TimeGraphEntryModel> provider = getProvider((TimeGraphEntry) entry); if (provider != null) { return getTooltip(provider, model.getId(), hoverTime); } } return Collections.emptyMap(); }

Target:
public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) { ITimeGraphEntry entry = event.getEntry(); if (event instanceof TimeEvent && !(event instanceof NullTimeEvent) && entry instanceof TimeGraphEntry) { ITmfTreeDataModel model = ((TimeGraphEntry) entry).getEntryModel(); ITimeGraphDataProvider<? extends TimeGraphEntryModel> provider = getProvider((TimeGraphEntry) entry); if (provider != null) { return getTooltip(provider, model.getId(), hoverTime); } } return Collections.emptyMap(); }
Source:
protected boolean canDoAction() { VM vm = getVm(); if (vm == null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND); } if (vm.getStatus() == VMStatus.Paused) { return true; } List<String> messages = getReturnValue().getCanDoActionMessages(); List<Disk> vmDisks = getDiskDao().getAllForVm(vm.getId(), true); VDS destVds = getDestinationVds(); if (!getRunVmValidator().canRunVm(vm, messages, vmDisks, getParameters().getBootSequence(), getStoragePool(), isInternalExecution(), getParameters().getDiskPath(), getParameters().getFloppyPath(), getParameters().getRunAsStateless(), getRunVdssList(), destVds == null ? null : destVds.getId(), getVdsGroup()) && validateNetworkInterfaces()) { return false; } if (getParameters().getVmPayload() != null) { boolean isPayloadValid = checkPayload(getParameters().getVmPayload(), getParameters().getDiskPath()); if (isPayloadValid && !StringUtils.isEmpty(getParameters().getFloppyPath()) && getParameters().getVmPayload().getType() == VmDeviceType.FLOPPY) { return failCanDoAction(VdcBllMessages.VMPAYLOAD_FLOPPY_EXCEEDED); } getVm().setVmPayload(getParameters().getVmPayload()); } return true; }

Target:
protected boolean canDoAction() { VM vm = getVm(); if (vm == null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND); } if (vm.getStatus() == VMStatus.Paused) { return true; } List<String> messages = getReturnValue().getCanDoActionMessages(); List<Disk> vmDisks = getDiskDao().getAllForVm(vm.getId(), true); VDS destVds = getDestinationVds(); if (!getRunVmValidator().canRunVm(vm, messages, vmDisks, getParameters().getBootSequence(), getStoragePool(), isInternalExecution(), getParameters().getDiskPath(), getParameters().getFloppyPath(), getParameters().getRunAsStateless(), getRunVdssList(), destVds == null ? null : destVds.getId(), getVdsGroup()) && validateNetworkInterfaces()) { return false; } if (getParameters().getVmPayload() != null) { if (checkPayload(getParameters().getVmPayload(), getParameters().getDiskPath()) && !StringUtils.isEmpty(getParameters().getFloppyPath()) && getParameters().getVmPayload().getType() == VmDeviceType.FLOPPY) { return failCanDoAction(VdcBllMessages.VMPAYLOAD_FLOPPY_EXCEEDED); } getVm().setVmPayload(getParameters().getVmPayload()); } return true; }
Source:
public Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp) { try { final URI requestURI = req.getRequestURI(); final String path = requestURI.getPath(); final String backendURL = getMatchedBackendURL(path, requestURI); LOG.logMessage("Generated backend URL for websocket connection: " + backendURL); return new ProxyWebSocketAdapter(URI.create(backendURL), pool, getClientEndpointConfig(req)); } catch (final Exception e) { LOG.failedCreatingWebSocket(e); throw e; } }

Target:
public Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp) { try { final URI requestURI = req.getRequestURI(); final String path = requestURI.getPath(); final String backendURL = getMatchedBackendURL(path, requestURI); LOG.debugLog("Generated backend URL for websocket connection: " + backendURL); return new ProxyWebSocketAdapter(URI.create(backendURL), pool, getClientEndpointConfig(req)); } catch (final Exception e) { LOG.failedCreatingWebSocket(e); throw e; } }
Source:
public T map(int row, ResultSet rs, StatementContext ctx) throws SQLException { T bean; try { bean = type.newInstance(); } catch (Exception e) { throw new IllegalArgumentException(String.format("A bean, %s, was mapped " + "which was not instantiable", type.getName()), e); } ResultSetMetaData metadata = rs.getMetaData(); for (int i = 1; i <= metadata.getColumnCount(); ++i) { String name = metadata.getColumnLabel(i).toLowerCase(); Field field = properties.get(name); if (field != null) { Class type = field.getType(); Object value; ResultColumnMapper mapper = ctx.columnMapperFor(type); if (mapper != null) { value = mapper.mapColumn(rs, i, ctx); } else if (type.isEnum()) { String str = rs.getString(i); value = str == null ? null : Enum.valueOf(type, str); } else { value = rs.getObject(i); } try { field.setAccessible(true); field.set(bean, value); } catch (IllegalAccessException e) { throw new IllegalArgumentException(String.format("Unable to access " + "property, %s", name), e); } } } return bean; }

Target:
public T map(int row, ResultSet rs, StatementContext ctx) throws SQLException { T bean; try { bean = type.newInstance(); } catch (Exception e) { throw new IllegalArgumentException(String.format("A bean, %s, was mapped " + "which was not instantiable", type.getName()), e); } ResultSetMetaData metadata = rs.getMetaData(); for (int i = 1; i <= metadata.getColumnCount(); ++i) { String name = metadata.getColumnLabel(i).toLowerCase(); Field field = properties.get(name); if (field != null) { Class type = field.getType(); Object value; ResultColumnMapper mapper = ctx.columnMapperFor(type); if (mapper != null) { value = mapper.mapColumn(rs, i, ctx); } else { value = rs.getObject(i); } try { field.setAccessible(true); field.set(bean, value); } catch (IllegalAccessException e) { throw new IllegalArgumentException(String.format("Unable to access " + "property, %s", name), e); } } } return bean; }
Source:
public DispoConfig findDispoConfig(DispoProgram program) { ArtifactReadable config = getQuery().fromBranch(program.getUuid()).andNameEquals("Program Config").getResults().getOneOrNull(); if (config == null) { DispoUtil.getDefaultConfig(); } return DispoUtil.configArtToConfigData(new DispoConfigArtifact(config)); }

Target:
public DispoConfig findDispoConfig(DispoProgram program) { ArtifactReadable config = getQuery().fromBranch(program.getUuid()).andNameEquals("Program Config").getResults().getOneOrNull(); if (config == null) { return DispoUtil.getDefaultConfig(); } return DispoUtil.configArtToConfigData(new DispoConfigArtifact(config)); }
Source:
public void testMultipleStringValuesWithEmpty() { Assert.assertEquals("In<Utf8>#toString(STRING)", ",a,b", Predicates.in(new Utf8("a"), new Utf8("b"), new Utf8("")).toString(STRING)); Assert.assertEquals("In#toString(STRING)", ",a,b", Predicates.in("a", "b", "").toString(STRING)); Assert.assertEquals("In.fromString(String, STRING)", Predicates.in("a", "b", ""), In.<String>fromString("a,b,", STRING)); }

Target:
public void testMultipleStringValuesWithEmpty() { Assert.assertEquals("In<Utf8>#toString(STRING)", "a,b,", Predicates.in(new Utf8("a"), new Utf8("b"), new Utf8("")).toString(STRING)); Assert.assertEquals("In#toString(STRING)", "a,b,", Predicates.in("a", "b", "").toString(STRING)); Assert.assertEquals("In.fromString(String, STRING)", Predicates.in("a", "b", ""), In.<String>fromString("a,b,", STRING)); }
Source:
static Collection<FunctionDesc> mergeFunctionLists(List<FunctionDesc> ... functionLists) throws AmbiguousFunctionException { Map<Integer, FunctionDesc> funcMap = new HashMap<>(); List<FunctionDesc> baseFuncList = functionLists[0]; for (FunctionDesc desc: baseFuncList) { funcMap.put(desc.hashCodeWithoutType(), desc); } for (int i=1; i<functionLists.length; i++) { for (FunctionDesc desc: functionLists[i]) { if (funcMap.containsKey(desc.hashCodeWithoutType())) { throw new AmbiguousFunctionException(String.format("UDF %s", desc.toString())); } funcMap.put(desc.hashCodeWithoutType(), desc); baseFuncList.add(desc); } } return baseFuncList; }

Target:
static Collection<FunctionDesc> mergeFunctionLists(List<FunctionDesc> ... functionLists) throws AmbiguousFunctionException { Map<Integer, FunctionDesc> funcMap = new HashMap<>(); List<FunctionDesc> baseFuncList = functionLists[0]; for (FunctionDesc desc: baseFuncList) { funcMap.put(desc.hashCodeWithoutType(), desc); } for (int i=1; i<functionLists.length; i++) { for (FunctionDesc desc: functionLists[i]) { if (funcMap.containsKey(desc.hashCodeWithoutType())) { FunctionDesc storedDesc = funcMap.get(desc.hashCodeWithoutType()); if (storedDesc.equalsSignature(desc)) { throw new AmbiguousFunctionException(String.format("%s", storedDesc.toString())); } } funcMap.put(desc.hashCodeWithoutType(), desc); baseFuncList.add(desc); } } return baseFuncList; }
Source:
public void setup() { InputStream resourceAsStream = contextClassLoader.getResourceAsStream(location); final ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); Source xsltSource = null; try { xsltSource = new StreamSource(resourceAsStream); TransformerFactory tf = TransformerFactory.newInstance(); tf.setURIResolver(new URIResolver() { @Override public Source resolve(String href, String base) throws TransformerException { if (StringUtils.contains(href, "http://")) { LOG.warn("Trying to fetch remote URL for XSLT. This is not possible; for speed reasons: " + href + ": " + base); return null; } return new StreamSource(Thread.currentThread().getContextClassLoader().getResourceAsStream(href)); } }); Thread.currentThread().setContextClassLoader(javax.xml.transform.TransformerFactory.class.getClassLoader()); xsltTransformer = tf.newTransformer(xsltSource); if (xsltParameters != null) { for (String key : xsltParameters.keySet()) { if (LOG.isDebugEnabled()) { LOG.debug("Setting property: " + key + " -> " + xsltParameters.get(key)); } xsltTransformer.setParameter(key, xsltParameters.get(key)); } } if (LOG.isDebugEnabled()) { LOG.debug("Created XSLT successfully: " + location); } } catch (Exception e) { throw new IllegalStateException("Not able to initialize the XSLT transformer.", e); } finally { Thread.currentThread().setContextClassLoader(oldLoader); } }

Target:
public void setup() { try(InputStream resourceAsStream = contextClassLoader.getResourceAsStream(location)) { final Source xsltSource = new StreamSource(resourceAsStream); final TransformerFactory tf = TransformerFactory.newInstance(); tf.setURIResolver(new URIResolver() { @Override public Source resolve(String href, String base) throws TransformerException { if (StringUtils.contains(href, "http://")) { LOG.warn("Trying to fetch remote URL for XSLT. This is not possible; for speed reasons: " + href + ": " + base); return null; } return new StreamSource(Thread.currentThread().getContextClassLoader().getResourceAsStream(href)); } }); ClassLoaders.executeIn(TransformerFactory.class.getClassLoader(), new Callable<Object>(){ @Override public Object call() throws Exception { xsltTransformer = tf.newTransformer(xsltSource); return null; } }); if (xsltParameters != null) { for (String key : xsltParameters.keySet()) { if (LOG.isDebugEnabled()) { LOG.debug("Setting property: " + key + " -> " + xsltParameters.get(key)); } xsltTransformer.setParameter(key, xsltParameters.get(key)); } } if (LOG.isDebugEnabled()) { LOG.debug("Created XSLT successfully: " + location); } } catch (Exception e) { throw new IllegalStateException("Not able to initialize the XSLT transformer.", e); } }
Source:
public void setTextFromFile(String filepath) { try { byte[] encoded = Files.readAllBytes(Paths.get(filepath)); this.text = new String(encoded); } catch (IOException ex) { System.err.println("Cannot read '" + filepath + "': " + ex); System.exit(1); } }

Target:
public void setTextFromFile(String filepath) throws IOException { byte[] encoded = Files.readAllBytes(Paths.get(filepath)); this.text = new String(encoded); }
Source:
static ThreadJob joinRun(ThreadJob threadJob, IProgressMonitor monitor) { if (isCanceled(monitor)) throw new OperationCanceledException(); InternalJob blockingJob = manager.findBlockingJob(threadJob); Thread blocker = blockingJob == null ? null : blockingJob.getThread(); ThreadJob result; boolean setInterruptFlagAtEnd = JobManager.reactToInterruption ? false : Thread.interrupted(); boolean interruptedDuringWaitForRun; try { if (manager.getLockManager().aboutToWait(blocker)) return threadJob; result = waitForRun(threadJob, monitor, blockingJob, blocker); } finally { interruptedDuringWaitForRun = Thread.interrupted(); manager.getLockManager().aboutToRelease(); if (setInterruptFlagAtEnd) { Thread.currentThread().interrupt(); } } if (interruptedDuringWaitForRun) { throw new OperationCanceledException(); } return result; }

Target:
static ThreadJob joinRun(ThreadJob threadJob, IProgressMonitor monitor) { if (isCanceled(monitor)) throw new OperationCanceledException(); InternalJob blockingJob = manager.findBlockingJob(threadJob); Thread blocker = blockingJob == null ? null : blockingJob.getThread(); ThreadJob result; boolean setInterruptFlagAtEnd = !JobManager.reactToInterruption && Thread.interrupted(); boolean interruptedDuringWaitForRun; try { if (manager.getLockManager().aboutToWait(blocker)) return threadJob; result = waitForRun(threadJob, monitor, blockingJob, blocker); } finally { interruptedDuringWaitForRun = Thread.interrupted(); manager.getLockManager().aboutToRelease(); if (setInterruptFlagAtEnd) { Thread.currentThread().interrupt(); } } if (interruptedDuringWaitForRun) { throw new OperationCanceledException(); } return result; }