auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void triggerMisfired(Trigger trigger) { log.debug("Trigger misfired for for Job: \nKey: {}\nJob Key: {}\nStart: {}\nEnd: {}\n" + "Final Fire Time: {}\nNext Fire Time: {}\nMisfire Instruction: {}\nPriority: {}", trigger.getKey(), trigger.getJobKey(), trigger.getStartTime(), trigger.getEndTime(), trigger.getFinalFireTime(), trigger.getNextFireTime(), trigger.getMisfireInstruction(), trigger.getPriority()); }

Target:
public void triggerMisfired(Trigger trigger) { log.warn("Trigger misfired for for Job: \nKey: {}\nJob Key: {}\nStart: {}\nEnd: {}\n" + "Final Fire Time: {}\nNext Fire Time: {}\nMisfire Instruction: {}\nPriority: {}", trigger.getKey(), trigger.getJobKey(), trigger.getStartTime(), trigger.getEndTime(), trigger.getFinalFireTime(), trigger.getNextFireTime(), trigger.getMisfireInstruction(), trigger.getPriority()); }
Source:
void writeNull(int columnIndex) { nullBitSet[columnIndex >>> 3] |= (1 << (columnIndex & 7)); }

Target:
private void writeNull(int columnIndex) { nullBitSet[columnIndex >>> 3] |= (1 << (columnIndex & 7)); }
Source:
public synchronized void handleMessageSetEpoch(@NonNull CorfuPayloadMsg<Long> msg, ChannelHandlerContext ctx, @NonNull IServerRouter r) { try { long epoch = msg.getPayload(); String remoteHostAddress = "0.0.0.0"; if (ctx.channel() != null) { remoteHostAddress = ((InetSocketAddress)ctx.channel().remoteAddress()).getAddress().getHostAddress(); } log.info("handleMessageSetEpoch: Received SET_EPOCH from (clientId={}:{}), moving to new epoch {}", msg.getClientID(), remoteHostAddress, epoch); serverContext.setServerEpoch(epoch, r); r.sendResponse(ctx, msg, CorfuMsgType.ACK.msg()); } catch (WrongEpochException e) { log.debug("handleMessageSetEpoch: Rejected SET_EPOCH current={}, requested={}", e.getCorrectEpoch(), msg.getPayload()); r.sendResponse(ctx, msg, new CorfuPayloadMsg<>(CorfuMsgType.WRONG_EPOCH, e.getCorrectEpoch())); } }

Target:
public synchronized void handleMessageSetEpoch(@NonNull CorfuPayloadMsg<Long> msg, ChannelHandlerContext ctx, @NonNull IServerRouter r) { try { long epoch = msg.getPayload(); String remoteHostAddress; try { remoteHostAddress = ((InetSocketAddress)ctx.channel().remoteAddress()).getAddress().getHostAddress(); } catch (NullPointerException e) { remoteHostAddress = "unavailable"; } log.info("handleMessageSetEpoch: Received SET_EPOCH from (clientId={}:{}), moving to new epoch {}", msg.getClientID(), remoteHostAddress, epoch); serverContext.setServerEpoch(epoch, r); r.sendResponse(ctx, msg, CorfuMsgType.ACK.msg()); } catch (WrongEpochException e) { log.debug("handleMessageSetEpoch: Rejected SET_EPOCH current={}, requested={}", e.getCorrectEpoch(), msg.getPayload()); r.sendResponse(ctx, msg, new CorfuPayloadMsg<>(CorfuMsgType.WRONG_EPOCH, e.getCorrectEpoch())); } }
Source:
private SleepEvents<Segment> aggregate(final SleepEvents<Segment> defaultEvents){ final List<ClusterAmplitudeData> clusterCopy = this.motionCluster.getCopyOfClusters(); Segment inBed = defaultEvents.goToBed; Segment sleep = defaultEvents.fallAsleep; final Pair<Long, Long> sleepTimesMillis = safeGuardPickSleep(this.sleepPeriod, clusterCopy, this.getAggregatedFeatures(), defaultEvents.fallAsleep.getStartTimestamp()); long sleepTimeMillis = sleepTimesMillis.getSecond(); inBed = new Segment(sleepTimesMillis.getFirst(), sleepTimesMillis.getFirst() + DateTimeConstants.MILLIS_PER_MINUTE, sleep.getOffsetMillis()); sleep = new Segment(sleepTimeMillis, sleepTimeMillis + DateTimeConstants.MILLIS_PER_MINUTE, defaultEvents.fallAsleep.getOffsetMillis()); if(inBed.getStartTimestamp() > sleep.getStartTimestamp()){ inBed = new Segment(sleep.getStartTimestamp() - 10 * DateTimeConstants.MILLIS_PER_MINUTE, sleep.getStartTimestamp() - 9 * DateTimeConstants.MILLIS_PER_MINUTE, sleep.getOffsetMillis()); } Segment wakeUp = defaultEvents.wakeUp; Segment outBed = defaultEvents.outOfBed; final Pair<Long, Long> wakeUpTimesMillis = safeGuardPickWakeUp(clusterCopy, sleepPeriod, getAggregatedFeatures(), defaultEvents.wakeUp.getStartTimestamp()); wakeUp = new Segment(wakeUpTimesMillis.getFirst(), wakeUpTimesMillis.getFirst() + DateTimeConstants.MILLIS_PER_MINUTE, wakeUp.getOffsetMillis()); outBed = new Segment(wakeUpTimesMillis.getSecond(), wakeUpTimesMillis.getSecond() + DateTimeConstants.MILLIS_PER_MINUTE, wakeUp.getOffsetMillis()); return SleepEvents.create(inBed, sleep, wakeUp, outBed); }

Target:
private SleepEvents<Segment> aggregate(final SleepEvents<Segment> defaultEvents){ final List<ClusterAmplitudeData> clusterCopy = this.motionCluster.getCopyOfClusters(); Segment inBed = defaultEvents.goToBed; Segment sleep = defaultEvents.fallAsleep; final Pair<Long, Long> sleepTimesMillis = safeGuardPickSleep(this.sleepPeriod, clusterCopy, this.getAggregatedFeatures(), defaultEvents.fallAsleep.getStartTimestamp()); long sleepTimeMillis = sleepTimesMillis.getSecond(); inBed = new Segment(sleepTimesMillis.getFirst(), sleepTimesMillis.getFirst() + DateTimeConstants.MILLIS_PER_MINUTE, sleep.getOffsetMillis()); sleep = new Segment(sleepTimeMillis, sleepTimeMillis + DateTimeConstants.MILLIS_PER_MINUTE, defaultEvents.fallAsleep.getOffsetMillis()); if(inBed.getStartTimestamp() > sleep.getStartTimestamp()){ inBed = new Segment(sleep.getStartTimestamp() - 10 * DateTimeConstants.MILLIS_PER_MINUTE, sleep.getStartTimestamp() - 9 * DateTimeConstants.MILLIS_PER_MINUTE, sleep.getOffsetMillis()); } Segment wakeUp = defaultEvents.wakeUp; Segment outBed = defaultEvents.outOfBed; final Pair<Long, Long> wakeUpTimesMillis = safeGuardPickWakeUp(clusterCopy, sleepPeriod, getAggregatedFeatures(), defaultEvents.wakeUp.getStartTimestamp()); wakeUp = new Segment(wakeUpTimesMillis.getFirst(), wakeUpTimesMillis.getFirst() + DateTimeConstants.MILLIS_PER_MINUTE, wakeUp.getOffsetMillis()); outBed = new Segment(wakeUpTimesMillis.getSecond(), wakeUpTimesMillis.getSecond() + DateTimeConstants.MILLIS_PER_MINUTE, outBed.getOffsetMillis()); return SleepEvents.create(inBed, sleep, wakeUp, outBed); }
Source:
public Mono<ShouldRetryResult> shouldRetry(Exception e) { if (!(e instanceof CosmosException)) { return Mono.just(ShouldRetryResult.noRetry()); } CosmosException cosmosException = (CosmosException)e; if (cosmosException.getStatusCode() != HttpConstants.StatusCodes.NOTFOUND || cosmosException.getSubStatusCode() != HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE) { LOGGER.debug( "SessionTokenMismatchRetryPolicy not retrying because StatusCode or SubStatusCode not found."); return Mono.just(ShouldRetryResult.noRetry()); } if (this.waitTimeTimeoutHelper.isElapsed()) { LOGGER.info( "SessionTokenMismatchRetryPolicy not retrying because it has exceeded " + "the time limit. Retry count = {}", this.retryCount); return Mono.just(ShouldRetryResult.noRetry()); } Duration effectiveBackoff = Duration.ZERO; if (this.retryCount.getAndIncrement() > 0) { effectiveBackoff = getEffectiveBackoff( this.currentBackoff, this.waitTimeTimeoutHelper.getRemainingTime()); this.currentBackoff = getEffectiveBackoff( Duration.ofMillis(this.currentBackoff.toMillis() * BACKOFF_MULTIPLIER), this.maximumBackoff); } LOGGER.debug( "SessionTokenMismatchRetryPolicy will retry. Retry count = {}. Backoff time = ms", this.retryCount, effectiveBackoff.toMillis()); return Mono.just(ShouldRetryResult.retryAfter(effectiveBackoff)); }

Target:
public Mono<ShouldRetryResult> shouldRetry(Exception e) { if (!(e instanceof CosmosException)) { return Mono.just(ShouldRetryResult.noRetry()); } CosmosException cosmosException = (CosmosException)e; if (cosmosException.getStatusCode() != HttpConstants.StatusCodes.NOTFOUND || cosmosException.getSubStatusCode() != HttpConstants.SubStatusCodes.READ_SESSION_NOT_AVAILABLE) { LOGGER.debug( "SessionTokenMismatchRetryPolicy not retrying because StatusCode or SubStatusCode not found."); return Mono.just(ShouldRetryResult.noRetry()); } if (this.waitTimeTimeoutHelper.isElapsed()) { LOGGER.warn( "SessionTokenMismatchRetryPolicy not retrying because it has exceeded " + "the time limit. Retry count = {}", this.retryCount); return Mono.just(ShouldRetryResult.noRetry()); } Duration effectiveBackoff = Duration.ZERO; if (this.retryCount.getAndIncrement() > 0) { effectiveBackoff = getEffectiveBackoff( this.currentBackoff, this.waitTimeTimeoutHelper.getRemainingTime()); this.currentBackoff = getEffectiveBackoff( Duration.ofMillis(this.currentBackoff.toMillis() * BACKOFF_MULTIPLIER), this.maximumBackoff); } LOGGER.debug( "SessionTokenMismatchRetryPolicy will retry. Retry count = {}. Backoff time = ms", this.retryCount, effectiveBackoff.toMillis()); return Mono.just(ShouldRetryResult.retryAfter(effectiveBackoff)); }
Source:
private Map getSubjectPreferences(Subject subject) { String userid = subjectIdentity.getUniqueIdentifier(subject); try { String filter = String.format("user = '%s'", userid); List<Map<String, Object>> preferencesList = persistentStore.get(PersistenceType.PREFERENCES_TYPE.toString(), filter); if (preferencesList.size() == 1) { byte[] json = (byte[]) preferencesList.get(0).get("preferences_json_bin"); return GSON.fromJson( new String(json, Charset.defaultCharset()), new TypeToken<Map<String, Object>>() {}.getType()); } } catch (PersistenceException e) { LOGGER.info( "PersistenceException while trying to retrieve persisted preferences for user {}", userid, e); } return Collections.emptyMap(); }

Target:
private Map getSubjectPreferences(Subject subject) { String userid = subjectIdentity.getUniqueIdentifier(subject); try { String filter = String.format("user = '%s'", userid); List<Map<String, Object>> preferencesList = persistentStore.get(PersistenceType.PREFERENCES_TYPE.toString(), filter); if (preferencesList.size() == 1) { byte[] json = (byte[]) preferencesList.get(0).get("preferences_json_bin"); return GSON.fromJson(new String(json, Charset.defaultCharset()), MAP_STRING_TO_OBJECT_TYPE); } } catch (PersistenceException e) { LOGGER.info( "PersistenceException while trying to retrieve persisted preferences for user {}", userid, e); } return Collections.emptyMap(); }
Source:
public PerformanceResult call() throws Exception { final Ds3ClientHelpers helpers = Ds3ClientHelpers.wrap(getClient()); final int numberOfFiles = Integer.valueOf(this.numberOfFiles); final long sizeOfFiles = Integer.valueOf(this.sizeOfFiles); try { helpers.ensureBucketExists(this.bucketName); final List<Ds3Object> objList = Lists.newArrayList(); for (int i = 0; i < numberOfFiles; i++) { final long testFileSize = sizeOfFiles * 1024L * 1024L; final Ds3Object obj = new Ds3Object("file_" + i, testFileSize); objList.add(obj); } transfer(helpers, numberOfFiles, sizeOfFiles, objList, true); transfer(helpers, numberOfFiles, sizeOfFiles, objList, false); } finally { deleteAllContents(getClient(), this.bucketName); } return new PerformanceResult("Done!"); }

Target:
public PerformanceResult call() throws Exception { final Ds3ClientHelpers helpers = Ds3ClientHelpers.wrap(getClient()); final int numberOfFiles = Integer.valueOf(this.numberOfFiles); final long sizeOfFiles = Integer.valueOf(this.sizeOfFiles); try { helpers.ensureBucketExists(this.bucketName); final List<Ds3Object> objList = getDs3Objects(numberOfFiles, sizeOfFiles); transfer(helpers, numberOfFiles, sizeOfFiles, objList, true); transfer(helpers, numberOfFiles, sizeOfFiles, objList, false); } finally { deleteAllContents(getClient(), this.bucketName); } return new PerformanceResult("Done!"); }
Source:
void clearWALEntryBatch() { while(this.isAlive() || this.entryReader.isAlive()){ try { Thread.sleep(this.sleepForRetries); } catch (InterruptedException e) { LOG.info("{} Interrupted while waiting to stop on clearWALEntryBatch", this.source.getPeerId(), this.getName()); Thread.currentThread().interrupt(); } } LongAccumulator totalToDecrement = new LongAccumulator((a,b) -> a + b, 0); entryReader.entryBatchQueue.forEach(w -> { entryReader.entryBatchQueue.remove(w); w.getWalEntries().forEach(e -> { long entrySizeExcludeBulkLoad = entryReader.getEntrySizeExcludeBulkLoad(e); totalToDecrement.accumulate(entrySizeExcludeBulkLoad); }); }); source.getSourceManager().getTotalBufferUsed().addAndGet(-totalToDecrement.longValue()); }

Target:
void clearWALEntryBatch() { long timeout = System.currentTimeMillis() + this.shipEditsTimeout; while(this.isAlive() || this.entryReader.isAlive()){ try { if (System.currentTimeMillis() >= timeout) { LOG.warn("Interrupting source thread for peer without cleaning buffer usage " + "because clearWALEntryBatch method timed out whilst waiting reader/shipper " + "thread to stop.", this.source.getPeerId()); Thread.currentThread().interrupt(); } else { Thread.sleep(this.sleepForRetries); } } catch (InterruptedException e) { LOG.warn("{} Interrupted while waiting to stop on clearWALEntryBatch: {}", this.source.getPeerId(), this.getName(), e); Thread.currentThread().interrupt(); } } LongAccumulator totalToDecrement = new LongAccumulator((a,b) -> a + b, 0); entryReader.entryBatchQueue.forEach(w -> { entryReader.entryBatchQueue.remove(w); w.getWalEntries().forEach(e -> { long entrySizeExcludeBulkLoad = entryReader.getEntrySizeExcludeBulkLoad(e); totalToDecrement.accumulate(entrySizeExcludeBulkLoad); }); }); LOG.trace("Decrementing totalBufferUsed by {}B while stopping Replication WAL Readers.", totalToDecrement.longValue()); source.getSourceManager().getTotalBufferUsed().addAndGet(-totalToDecrement.longValue()); }
Source:
private Set<Project.NameKey> getGrandParents(Project parent) { Set<Project.NameKey> grandParents = Sets.newHashSet(); if (parent != null) { Project.NameKey gp = parent.getParent(allProjects); while (gp != null && grandParents.add(gp)) { final ProjectState s = cache.get(gp); if (s != null) { gp = s.getProject().getParent(); } else { break; } } } return grandParents; }

Target:
private Set<Project.NameKey> getGrandParents(Project parent) { Set<Project.NameKey> grandParents = Sets.newHashSet(); if (parent != null) { Project.NameKey gp = parent.getParent(allProjects); while (gp != null && grandParents.add(gp)) { ProjectState s = cache.get(gp); if (s != null) { gp = s.getProject().getParent(); } else { break; } } } return grandParents; }
Source:
public Command execute() throws RollBackCommandException { try { Session sess = this.getSecAdvisor().getReadOnlyHibernateSession(this.getUsername()); if(idTopic != null) { Topic dataTrack = (Topic) (sess.load(Topic.class, idTopic)); if (!this.getSecAdvisor().canRead(dataTrack)) { this.addInvalidField("perm", "Insufficient permission to access this topic"); } } else { this.addInvalidField("topicNumber", "topicNumber is either invalid or not provided"); } if (isValid()) { this.xmlResult = "<SUCCESS/>"; setResponsePage(this.SUCCESS_JSP); } else { setResponsePage(this.ERROR_JSP); } } catch (NamingException e){ LOG.error("An exception has occurred in CheckTopicPermission ", e); e.printStackTrace(System.out); throw new RollBackCommandException(e.getMessage()); } catch (SQLException e) { LOG.error("An exception has occurred in CheckTopicPermission ", e); e.printStackTrace(System.out); throw new RollBackCommandException(e.getMessage()); } catch (Exception e) { LOG.error("An exception has occurred in CheckTopicPermission ", e); e.printStackTrace(System.out); throw new RollBackCommandException(e.getMessage()); } finally { try { this.getSecAdvisor().closeReadOnlyHibernateSession(); } catch(Exception e) { } } return this; }

Target:
public Command execute() throws RollBackCommandException { try { Session sess = this.getSecAdvisor().getReadOnlyHibernateSession(this.getUsername()); if(idTopic != null) { Topic dataTrack = (Topic) (sess.load(Topic.class, idTopic)); if (!this.getSecAdvisor().canRead(dataTrack)) { this.addInvalidField("perm", "Insufficient permission to access this topic"); } } else { this.addInvalidField("topicNumber", "topicNumber is either invalid or not provided"); } if (isValid()) { this.xmlResult = "<SUCCESS/>"; setResponsePage(this.SUCCESS_JSP); } else { setResponsePage(this.ERROR_JSP); } } catch (Exception e) { LOG.error("An exception has occurred in CheckTopicPermission ", e); throw new RollBackCommandException(e.getMessage()); } finally { try { this.getSecAdvisor().closeReadOnlyHibernateSession(); } catch(Exception e) { LOG.error("An exception has occurred in CheckTopicPermission ", e); } } return this; }
Source:
public void queryLabelWithNoResults() throws Exception { List<ChangeInfo> changeInfos = newGson().fromJson( adminSession.get("/changes/?q=label:Code-Review-2") .getReader(), new TypeToken<List<ChangeInfo>>() .getType()); assertThat(changeInfos).hasSize(0); }

Target:
public void queryLabelWithNoResults() throws Exception { List<ChangeInfo> changeInfos = GET("Code-Review-2"); assertThat(changeInfos).isEmpty(); }
Source:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ((MifosBaseActivity) getActivity()).getActivityComponent().inject(this); Bundle arguments = getArguments(); if (arguments != null) { mIsGroupAccount = arguments.containsKey(Constants.GROUP_ID); clientId = arguments.getInt(Constants.CLIENT_ID); groupId = arguments.getInt(Constants.GROUP_ID); } }

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ((MifosBaseActivity) getActivity()).getActivityComponent().inject(this); Bundle arguments = getArguments(); if (arguments != null) { isGroupAccount = arguments.getBoolean(Constants.GROUP_ACCOUNT); clientId = arguments.getInt(Constants.CLIENT_ID); groupId = arguments.getInt(Constants.GROUP_ID); } }
Source:
public MatchResult detailMatches(PlanNode node, PlanNodeCost cost, Session session, Metadata metadata, SymbolAliases symbolAliases) { checkState(shapeMatches(node), "Plan testing framework error: shapeMatches returned false in detailMatches in %s", this.getClass().getName()); TableScanNode tableScanNode = (TableScanNode) node; TableMetadata tableMetadata = metadata.getTableMetadata(session, tableScanNode.getTable()); String actualTableName = tableMetadata.getTable().getTableName(); return new MatchResult( expectedTableName.equalsIgnoreCase(actualTableName) && ((!expectedConstraint.isPresent()) || domainsMatch(expectedConstraint, tableScanNode.getCurrentConstraint(), tableScanNode.getTable(), session, metadata))); }

Target:
public MatchResult detailMatches(PlanNode node, PlanNodeCost cost, Session session, Metadata metadata, SymbolAliases symbolAliases) { checkState(shapeMatches(node), "Plan testing framework error: shapeMatches returned false in detailMatches in %s", this.getClass().getName()); TableScanNode tableScanNode = (TableScanNode) node; TableMetadata tableMetadata = metadata.getTableMetadata(session, tableScanNode.getTable()); String actualTableName = tableMetadata.getTable().getTableName(); return new MatchResult( expectedTableName.equalsIgnoreCase(actualTableName) && originalConstraintMatches(tableScanNode) && ((!expectedConstraint.isPresent()) || domainsMatch(expectedConstraint, tableScanNode.getCurrentConstraint(), tableScanNode.getTable(), session, metadata))); }
Source:
public void processElement(ProcessContext context) throws Exception { KV<String, Iterable<Mutation>> element = context.element(); List<Mutation> mutations = Lists.newArrayList(element.getValue()); try { getMutator(element.getKey()).mutate(mutations); } catch (RetriesExhaustedWithDetailsException exception) { logExceptions(context, exception); rethrowException(exception); } mutationsCounter.addValue((long) mutations.size()); }

Target:
public void processElement(ProcessContext context) throws Exception { KV<String, Iterable<Mutation>> element = context.element(); BufferedMutator mutator = getMutator(element.getKey()); try { for (Mutation mutation : element.getValue()) { mutator.mutate(mutation); mutationsCounter.addValue(1l); } } catch (RetriesExhaustedWithDetailsException exception) { logExceptions(context, exception); rethrowException(exception); } }
Source:
public JSONPlugin() { super(Arrays.asList( (Class<? extends Plugin>) JSONFieldPlugin.class, JSONViewPropertyPlugin.class, JSONInheritedPropertyPlugin.class)); }

Target:
public JSONPlugin() { super(Arrays.<Class<? extends Plugin>>asList( JSONFieldPlugin.class, JSONViewPropertyPlugin.class, JSONInheritedPropertyPlugin.class)); }
Source:
private Boolean tryInjection(HttpMessage msg, String param, XSLTInjectionType checkType) { for (String payload : checkType.payloads) { try { if (isStop() || requestsLimitReached()) { if (LOG.isDebugEnabled()) { LOG.debug("Scanner " + getName() + " Stopping."); } return false; } msg = sendRequest(msg, param, payload); for (String response : checkType.responses) { if (getBaseMsg().getResponseBody().toString().contains(response)) { continue; } if (msg.getResponseBody().toString().contains(response)) { raiseAlert(msg, param, payload, response, checkType.resourceIdentifier); return true; } } } catch (Exception e) { LOG.warn( "An error occurred while checking [" + msg.getRequestHeader().getMethod() + "] [" + msg.getRequestHeader().getURI() + "] for " + getName() + " Caught " + e.getClass().getName() + " " + e.getMessage()); continue; } } return false; }

Target:
private Boolean tryInjection(HttpMessage msg, String param, XSLTInjectionType checkType) { Predicate<String> filterEvidence = ((Predicate<String>) (getBaseMsg().getResponseBody().toString()::contains)) .negate(); String[] relevantEvidence = Arrays.stream(checkType.getEvidences()) .filter(filterEvidence) .toArray(String[]::new); for (String payload : checkType.getPayloads(msg)) { try { if (isStop() || requestsLimitReached()) { if (LOG.isDebugEnabled()) { LOG.debug("Scanner " + getName() + " Stopping."); } return true; } msg = sendRequest(msg, param, payload); for (String evidence : relevantEvidence) { if (msg.getResponseBody().toString().contains(evidence)) { raiseAlert( msg, param, payload, evidence, checkType.getResourceIdentifier()); return true; } } } catch (Exception e) { LOG.warn( "An error occurred while checking [" + msg.getRequestHeader().getMethod() + "] [" + msg.getRequestHeader().getURI() + "] for " + getName() + " Caught " + e.getClass().getName() + " " + e.getMessage()); continue; } } return false; }
Source:
public ConfigKey<?>[] getConfigKeys() { return new ConfigKey<?>[] {NuageVspConfigDns, NuageVspDnsExternal, NuageVspConfigGateway, NuageVspSharedNetworkDomainTemplateName, NuageVspVpcDomainTemplateName, NuageVspIsolatedNetworkDomainTemplateName}; }

Target:
public ConfigKey<?>[] getConfigKeys() { return Arrays.copyOf(NUAGE_VSP_CONFIG_KEYS, NUAGE_VSP_CONFIG_KEYS.length); }
Source:
public void setValueAsString_shouldSetValueAsDateTimeIfDataTypeOfQuestionConceptIsDateTimeHavingTimeZone() throws Exception { Obs obs = new Obs(); ConceptDatatype cdt = new ConceptDatatype(); Concept c = new Concept(); c.setDatatype(cdt); obs.setConcept(c); String[] dates1 = { "2016-01-12T06:00:00+05:30", "2016-01-12T06:00:00+0530" }; String[] dates2 = { "2014-02-20T11:00:00.000-05:00", "2014-02-20T11:00:00.000-05" }; for (String date : dates1) { obs.setValueAsString(date); } for (String date : dates2) { obs.setValueAsString(date); } }

Target:
public void setValueAsString_shouldSetValueAsDateTimeIfDataTypeOfQuestionConceptIsDateTimeHavingTimeZone() throws Exception { Obs obs = new Obs(); ConceptDatatype cdt = new ConceptDatatype(); Concept c = new Concept(); c.setDatatype(cdt); obs.setConcept(c); String abbrev = c.getDatatype().getHl7Abbreviation(); String[] dates1 = { "2016-01-12T06:00:00+05:30", "2016-01-12T06:00:00+0530" }; String[] dates2 = { "201-02-20T11:00:00.000-05:00", "-02-20T11:00:00.000-05" }; for (String date : dates1) { obs.setValueAsString(date); } for (String date : dates2) { obs.setValueAsString(date); expectedException.expect(RuntimeException.class); expectedException.expectMessage("Don't know how to handle " + abbrev); } }
Source:
public JoinNode.Type getType() { return type; }

Target:
public Type getType() { return type; }
Source:
public void testGetSubscriptionByCreateTopicIfAutosubscribeEnabled() throws NotFoundException { Topic createdTopic = ObjectsFactory.topics(user, 1).get(0); user.setAutosubscribe(true); replyTopicStubs(createdTopic); Topic createdTopicLast = topicService.createTopic(createdTopic, ANSWER_BODY); assertTrue(createdTopicLast.userSubscribed(user), SUBSCRIBED); }

Target:
public void testGetSubscriptionByCreateTopicIfAutosubscribeEnabled() throws NotFoundException { Topic createdTopic = ObjectsFactory.topics(user, 1).get(0); user.setAutosubscribe(true); createTopicStubs(); Topic createdTopicLast = topicService.createTopic(createdTopic, ANSWER_BODY); verify(subscriptionService).subscribe(createdTopicLast); }
Source:
public static ThreadPool createJettyThreadPool(FileSettings jettySettings) throws Exception { int minThreads = ofNullable(jettySettings.getInteger("minThreads")).orElse(4); int maxThreads = ofNullable(jettySettings.getInteger("maxThreads")).orElse(12); int queueSize = ofNullable(jettySettings.getInteger("queueSize")).orElse(maxThreads); int idleTimeoutMs = ofNullable(jettySettings.getInteger("threadPoolIdleTimeoutMs")) .orElseGet(() -> Long.valueOf(TimeUnit.MINUTES.toMillis(1)).intValue()); QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads, minThreads, idleTimeoutMs, new BlockingArrayQueue<>(queueSize)); threadPool.start(); return threadPool; }

Target:
public static ThreadPool createJettyThreadPool(FileSettings jettySettings) throws Exception { int minThreads = ofNullable(jettySettings.getInteger("minThreads")).orElse(4); int maxThreads = ofNullable(jettySettings.getInteger("maxThreads")).orElse(12); int queueSize = ofNullable(jettySettings.getInteger("queueSize")).orElse(maxThreads); int idleTimeoutMs = ofNullable(jettySettings.getInteger("threadPoolIdleTimeoutMs")).orElse(DEFAULT_IDLE_TIMEOUT_MS); QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads, minThreads, idleTimeoutMs, new BlockingArrayQueue<>(queueSize)); threadPool.start(); return threadPool; }
Source:
public void testEmptyVersionInfoMeansNotAvailable() { BlazeVersionInfo info = new BlazeVersionInfo(ImmutableMap.of()); assertThat(info.isAvailable()).isFalse(); assertThat(info.getSummary()).isNull(); assertThat(info.getReleaseName()).isEqualTo("development version"); }

Target:
public void testEmptyVersionInfoMeansNotAvailable() { BlazeVersionInfo info = new BlazeVersionInfo(Collections.<String, String>emptyMap()); assertThat(info.isAvailable()).isFalse(); assertThat(info.getSummary()).isNull(); assertThat(info.getReleaseName()).isEqualTo("development version"); }
Source:
public void init() { try { threadMXBean = ManagementFactory.getThreadMXBean(); } catch (Exception e) { throw new IllegalStateException("Problem getting ThreadMXBean:" + e); } log.info("Initializing Thread Monitoring Service"); executor.scheduleWithFixedDelay(this::monitorEngineThreadPools, 0, Config.<Integer>getValue(ConfigValues.ThreadPoolMonitoringIntervalInMinutes), TimeUnit.MINUTES); log.info("Thread Monitoring Service initialized"); }

Target:
public void init() { try { threadMXBean = ManagementFactory.getThreadMXBean(); } catch (Exception e) { throw new IllegalStateException("Problem getting ThreadMXBean:" + e); } log.info("Initializing Thread Monitoring Service"); int threadPoolMonitoringIntervalInMinutes = Config.<Integer>getValue(ConfigValues.ThreadPoolMonitoringIntervalInMinutes); if (threadPoolMonitoringIntervalInMinutes <= 0) { log.info("Thread Monitoring Service is disabled."); } else { executor.scheduleWithFixedDelay(this::monitorEngineThreadPools, 0, threadPoolMonitoringIntervalInMinutes, TimeUnit.MINUTES); log.info("Thread Monitoring Service initialized"); } }
Source:
public static <OUT> Iterator<OUT> collect(DataStream<OUT> stream) { TypeSerializer<OUT> serializer = stream.getType().createSerializer( stream.getExecutionEnvironment().getConfig()); String id = UUID.randomUUID().toString(); String accumulatorName = "dataStreamCollect_" + id; CollectSinkOperatorFactory<OUT> factory = new CollectSinkOperatorFactory<>(serializer, accumulatorName); CollectSinkOperator<OUT> operator = (CollectSinkOperator<OUT>) factory.getOperator(); CollectResultIterator<OUT> iterator = new CollectResultIterator<>( operator.getOperatorIdFuture(), serializer, accumulatorName); CollectStreamSink<OUT> sink = new CollectStreamSink<>(stream, factory); sink.name("Data stream collect sink"); StreamExecutionEnvironment env = stream.getExecutionEnvironment(); env.addOperator(sink.getTransformation()); try { JobClient jobClient = env.executeAsync("DataStreamCollect_" + id); iterator.setJobClient(jobClient); } catch (Exception e) { throw new RuntimeException("Failed to execute data stream", e); } return iterator; }

Target:
public static <OUT> Iterator<OUT> collect(DataStream<OUT> stream) { TypeSerializer<OUT> serializer = stream.getType().createSerializer( stream.getExecutionEnvironment().getConfig()); String accumulatorName = "dataStreamCollect_" + UUID.randomUUID().toString(); CollectSinkOperatorFactory<OUT> factory = new CollectSinkOperatorFactory<>(serializer, accumulatorName); CollectSinkOperator<OUT> operator = (CollectSinkOperator<OUT>) factory.getOperator(); CollectResultIterator<OUT> iterator = new CollectResultIterator<>( operator.getOperatorIdFuture(), serializer, accumulatorName); CollectStreamSink<OUT> sink = new CollectStreamSink<>(stream, factory); sink.name("Data stream collect sink"); StreamExecutionEnvironment env = stream.getExecutionEnvironment(); env.addOperator(sink.getTransformation()); try { JobClient jobClient = env.executeAsync("Data Stream Collect"); iterator.setJobClient(jobClient); } catch (Exception e) { throw new RuntimeException("Failed to execute data stream", e); } return iterator; }
Source:
public static String getRevision() { return REVISION; }

Target:
public static int getRevision() { return REVISION; }
Source:
public EditorNotificationPanel createNotificationPanel(VirtualFile file, FileEditor fileEditor) { final Module module = ModuleUtilCore.findModuleForFile(file, myProject); if (module == null) { return null; } final AndroidFacet facet = AndroidFacet.getInstance(module); if (facet == null) { return null; } if (!facet.isGradleProject()) { return null; } if (!file.getPath().contains("build")) { return null; } for (VirtualFile baseDir : ModuleRootManager.getInstance(module).getContentRoots()) { VirtualFile build = baseDir.findChild("build"); if (build != null && VfsUtilCore.isAncestor(build, file, true)) { VirtualFile explodedBundled = build.findChild("exploded-bundles"); boolean inAar = explodedBundled != null && VfsUtilCore.isAncestor(explodedBundled, file, true); String text; if (inAar) { text = "Resource files in Android library archive files (.aar) should not be edited"; } else { text = "Files under the build folder are generated and should not be edited."; } EditorNotificationPanel panel = new EditorNotificationPanel(); panel.setText(text); return panel; } } return null; }

Target:
public EditorNotificationPanel createNotificationPanel(VirtualFile file, FileEditor fileEditor) { final Module module = ModuleUtilCore.findModuleForFile(file, myProject); if (module == null) { return null; } final AndroidFacet facet = AndroidFacet.getInstance(module); if (facet == null) { return null; } if (!facet.isGradleProject()) { return null; } if (!file.getPath().contains(BUILD_DIR)) { return null; } for (VirtualFile baseDir : ModuleRootManager.getInstance(module).getContentRoots()) { VirtualFile build = baseDir.findChild(BUILD_DIR); if (build != null && VfsUtilCore.isAncestor(build, file, true)) { VirtualFile explodedBundled = build.findChild("exploded-bundles"); boolean inAar = explodedBundled != null && VfsUtilCore.isAncestor(explodedBundled, file, true); String text; if (inAar) { text = "Resource files inside Android library archive files (.aar) should not be edited"; } else { text = "Files under the build folder are generated and should not be edited."; } EditorNotificationPanel panel = new EditorNotificationPanel(); panel.setText(text); return panel; } } return null; }
Source:
public static void convertFileStorages(final FileStorage fileStorageToUpdate) { if (fileStorageToUpdate != null) { try { FileSupport.getInstance().getFileSet().stream() .filter(gf -> fileStorageToUpdate == gf.getFileStorage() && fileStorageToUpdate != gf.getStorage()) .forEach(gf -> gf.updateFileStorage()); logger.debug("FILE Conversion: DONE SUCESSFULLY!"); } catch (final Throwable e) { logger.debug("FILE Conversion: ABORTED!!!"); e.printStackTrace(); } } }

Target:
public static void convertFileStorages(final FileStorage fileStorageToUpdate) { if (fileStorageToUpdate != null) { try { FileSupport.getInstance().getFileSet().stream() .filter(gf -> fileStorageToUpdate == gf.getFileStorage() && fileStorageToUpdate != gf.getStorage()) .forEach(GenericFile::updateFileStorage); logger.debug("FILE Conversion: DONE SUCESSFULLY!"); } catch (final Throwable e) { logger.debug("FILE Conversion: ABORTED!!!"); e.printStackTrace(); } } }
Source:
private List<String> getPrimaryBeanNames(String[] beanNamesForType) { final List<String> list = new ArrayList<>(); if (!(applicationContext instanceof ConfigurableApplicationContext)) { return Collections.emptyList(); } for (String beanName: beanNamesForType) { if (((ConfigurableApplicationContext) applicationContext).getBeanFactory() .getBeanDefinition(beanName).isPrimary()) { list.add(beanName); } } return list; }

Target:
private List<String> getPrimaryBeanNames(String[] beanNamesForType) { List<String> list = new ArrayList<>(); if (!(applicationContext instanceof ConfigurableApplicationContext)) { return Collections.emptyList(); } for (String beanName : beanNamesForType) { if (((ConfigurableApplicationContext) applicationContext).getBeanFactory() .getBeanDefinition(beanName).isPrimary()) { list.add(beanName); } } return list; }
Source:
public IStorage getStorage() { try { return fileRevision.getStorage(new NullProgressMonitor()); } catch (CoreException e) { StatusHandler.log(new Status(IStatus.WARNING, ReviewsUiPlugin.PLUGIN_ID, "Cannot retrieve file revision contents from local repository, defaulting to review contents instead")); } return null; }

Target:
public IStorage getStorage() { try { return fileRevision.getStorage(new ProgressMonitorPart(Display.getDefault().getActiveShell(), new FillLayout(), true)); } catch (CoreException e) { StatusHandler.log(new Status(IStatus.WARNING, ReviewsUiPlugin.PLUGIN_ID, "Cannot retrieve file revision contents from local repository, defaulting to review contents instead")); } return null; }
Source:
public CommitUpdate getCommitUpdate(long startTs) { Optional<LockWatchVersion> startVersion = timestampStateStore.getStartVersion(startTs); Optional<CommitInfo> maybeCommitInfo = timestampStateStore.getCommitInfo(startTs); assertTrue(maybeCommitInfo.isPresent() && startVersion.isPresent(), "start or commit info not processed for start timestamp"); CommitInfo commitInfo = maybeCommitInfo.get(); ClientLogEvents update = eventLog.getEventsBetweenVersions(startVersion, commitInfo.commitVersion()); if (update.clearCache()) { return ImmutableInvalidateAll.builder().build(); } assertEventsContainRangeOfVersions( Range.closed(startVersion.get().version(), commitInfo.commitVersion().version()), update, true); return createCommitUpdate(commitInfo, update.events().events()); }

Target:
public CommitUpdate getCommitUpdate(long startTs) { Optional<LockWatchVersion> startVersion = timestampStateStore.getStartVersion(startTs); Optional<CommitInfo> maybeCommitInfo = timestampStateStore.getCommitInfo(startTs); assertTrue(maybeCommitInfo.isPresent() && startVersion.isPresent(), "start or commit info not processed for start timestamp"); CommitInfo commitInfo = maybeCommitInfo.get(); return eventLog.getEventsBetweenVersions(startVersion, commitInfo.commitVersion()) .toCommitUpdate(startVersion.get(), commitInfo); }
Source:
private static String getChildContent(Element element, String tagName) { Optional<String> optionalChildContent = getOptionalChildContent(element, tagName); if (optionalChildContent.isPresent()) { return optionalChildContent.get(); } else { throw new IllegalStateException("Failed to get content of " + tagName); } }

Target:
private static String getChildContent(Element element, String tagName) { Optional<String> optionalChildContent = getOptionalChildContent(element, tagName); return optionalChildContent. orElseThrow(() -> new IllegalStateException("Failed to get content of " + tagName)); }
Source:
public void emptyLoginTest() throws InterruptedException { find("#repoOwnerField"); selectAll(); push(KeyCode.BACK_SPACE).type("abc").push(KeyCode.TAB); push(KeyCode.BACK_SPACE).type("abc").push(KeyCode.TAB); push(KeyCode.BACK_SPACE).push(KeyCode.TAB).push(KeyCode.BACK_SPACE); click("Sign in"); sleep(1000); assertNodeExists(hasText("Failed to sign in. Please try again.")); click("OK"); }

Target:
public void emptyLoginTest() throws InterruptedException { selectAll(); push(KeyCode.BACK_SPACE).type("abc").push(KeyCode.TAB); push(KeyCode.BACK_SPACE).type("abc").push(KeyCode.TAB); push(KeyCode.BACK_SPACE).push(KeyCode.TAB).push(KeyCode.BACK_SPACE); click("Sign in"); sleep(1000); assertNodeExists(hasText("Failed to sign in. Please try again.")); click("OK"); }
Source:
public boolean isEntity() { return super.isEntity() && isAssociation() || (super.isEntity() && isEntityInRelationshipWithProperties() && !isAnnotationPresent(CompositeProperty.class)); }

Target:
public boolean isEntity() { return super.isEntity() && isAssociation() || (super.isEntity() && isEntityInRelationshipWithProperties() && !isComposite()); }
Source:
public void testGetMyVotedIdeas() { JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID); List jsonList = previewPage.getJsonList(); Assert.assertFalse("GetAllBlogs returned no results", jsonList.isEmpty()); }

Target:
public void testGetMyVotedIdeas() { JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID); List jsonList = previewPage.getJsonList(); Assert.assertFalse("GetMyVotedIdeas returned no results", jsonList.isEmpty()); }
Source:
@Override public SearchRow prepareProxyIndexRow(SearchRow row) { if (row == null) return null; Value[] data = new Value[row.getColumnCount()]; for (int idx = 0; idx < data.length; idx++) data[idx] = row.getValue(idx); if (keyAliasColumnId > 0) { if (row.getValue(keyAliasColumnId) == null && row.getValue(KEY_COL) != null) data[keyAliasColumnId] = row.getValue(KEY_COL); if (row.getValue(KEY_COL) == null && row.getValue(keyAliasColumnId) != null) data[KEY_COL] = row.getValue(keyAliasColumnId); } if (valueAliasColumnId > 0) { if (row.getValue(valueAliasColumnId) == null && row.getValue(VAL_COL) != null) data[valueAliasColumnId] = row.getValue(VAL_COL); if (row.getValue(VAL_COL) == null && row.getValue(valueAliasColumnId) != null) data[VAL_COL] = row.getValue(valueAliasColumnId); } return new SimpleRow(data); }

Target:
@Override public SearchRow prepareProxyIndexRow(SearchRow row) { if (row == null) return null; Value[] data = new Value[row.getColumnCount()]; for (int idx = 0; idx < data.length; idx++) data[idx] = row.getValue(idx); copyAliasColumnData(data, KEY_COL, keyAliasColumnId); copyAliasColumnData(data, VAL_COL, valueAliasColumnId); return new SimpleRow(data); }
Source:
private static ModuleLoader setupModuleLoader(String modulePath, String... systemPackages) { assert modulePath != null : "modulePath not null"; File moduleDir = new File(trimPathToModulesDir(modulePath)); if (!moduleDir.exists() || !moduleDir.isDirectory()) { throw new RuntimeException("The specified module directory " + modulePath + " is invalid or does not exist."); } final String classPath = WildFlySecurityManager.getPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, null); try { WildFlySecurityManager.clearPropertyPrivileged(SYSPROP_KEY_CLASS_PATH); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_MODULE_PATH, modulePath); StringBuilder packages = new StringBuilder("org.jboss.modules,org.jboss.msc,org.jboss.dmr,org.jboss.threads,org.jboss.as.controller.client"); if (systemPackages != null) { for (String packageName : systemPackages) { packages.append(","); packages.append(packageName); } } WildFlySecurityManager.setPropertyPrivileged("jboss.modules.system.pkgs", packages.toString()); return Module.getBootModuleLoader(); } finally { WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, classPath); } }

Target:
private static ModuleLoader setupModuleLoader(String modulePath, String... systemPackages) { assert modulePath != null : "modulePath not null"; File moduleDir = new File(trimPathToModulesDir(modulePath)); if (!moduleDir.exists() || !moduleDir.isDirectory()) { throw new RuntimeException("The first directory of the specified module path " + modulePath + " is invalid or does not exist."); } WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_MODULES_DIR, moduleDir.getPath()); final String classPath = WildFlySecurityManager.getPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, null); try { WildFlySecurityManager.clearPropertyPrivileged(SYSPROP_KEY_CLASS_PATH); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_MODULE_PATH, modulePath); StringBuilder packages = new StringBuilder("org.jboss.modules,org.jboss.msc,org.jboss.dmr,org.jboss.threads,org.jboss.as.controller.client"); if (systemPackages != null) { for (String packageName : systemPackages) { packages.append(","); packages.append(packageName); } } WildFlySecurityManager.setPropertyPrivileged("jboss.modules.system.pkgs", packages.toString()); return Module.getBootModuleLoader(); } finally { WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, classPath); } }
Source:
private void updateFavPointBox() { final int favCount = cache.getFavoritePoints(); if (favCount >= 0) { favoriteLine.left.setVisibility(View.VISIBLE); favoriteLine.right.setText(favCount + "×"); } else { favoriteLine.left.setVisibility(View.GONE); } final LinearLayout layout = ButterKnife.findById(view, R.id.favpoint_box); final boolean supportsFavoritePoints = cache.supportsFavoritePoints(); layout.setVisibility(supportsFavoritePoints ? View.VISIBLE : View.GONE); if (!supportsFavoritePoints || cache.isOwner() || !Settings.isGCPremiumMember()) { return; } final ImageButton buttonAdd = ButterKnife.findById(view, R.id.add_to_favpoint); final ImageButton buttonRemove = ButterKnife.findById(view, R.id.remove_from_favpoint); final TextView text = ButterKnife.findById(view, R.id.favpoint_text); if (cache.isFavorite()) { buttonAdd.setVisibility(View.GONE); buttonRemove.setVisibility(View.VISIBLE); text.setText(R.string.cache_favpoint_on); } else { buttonAdd.setVisibility(View.VISIBLE); buttonRemove.setVisibility(View.GONE); text.setText(R.string.cache_favpoint_not_on); } if (!cache.isFound()) { buttonAdd.setEnabled(false); buttonAdd.setVisibility(View.GONE); buttonRemove.setEnabled(false); buttonRemove.setVisibility(View.GONE); } }

Target:
private void updateFavPointBox() { final int favCount = cache.getFavoritePoints(); if (favCount >= 0) { favoriteLine.left.setVisibility(View.VISIBLE); favoriteLine.right.setText(res.getString(R.string.favorite_count, favCount)); } else { favoriteLine.left.setVisibility(View.GONE); } final LinearLayout layout = ButterKnife.findById(view, R.id.favpoint_box); final boolean supportsFavoritePoints = cache.supportsFavoritePoints(); layout.setVisibility(supportsFavoritePoints ? View.VISIBLE : View.GONE); if (!supportsFavoritePoints || cache.isOwner() || !Settings.isGCPremiumMember()) { return; } final ImageButton buttonAdd = ButterKnife.findById(view, R.id.add_to_favpoint); final ImageButton buttonRemove = ButterKnife.findById(view, R.id.remove_from_favpoint); final TextView text = ButterKnife.findById(view, R.id.favpoint_text); if (cache.isFavorite()) { buttonAdd.setVisibility(View.GONE); buttonRemove.setVisibility(View.VISIBLE); text.setText(R.string.cache_favpoint_on); } else { buttonAdd.setVisibility(View.VISIBLE); buttonRemove.setVisibility(View.GONE); text.setText(R.string.cache_favpoint_not_on); } if (!cache.isFound()) { buttonAdd.setEnabled(false); buttonAdd.setVisibility(View.GONE); buttonRemove.setEnabled(false); buttonRemove.setVisibility(View.GONE); } }
Source:
public void testQuietOutputIsSorted() throws Exception { when(options.getBoolean("q")).thenReturn(true); int ret = command.run(options, client, out, false, null); assertEquals(0, ret); assertEquals(expectedOrder, readJobIdsFromOutput(false)); }

Target:
public void testQuietOutputIsSorted() throws Exception { when(options.getBoolean("q")).thenReturn(true); final int ret = command.run(options, client, out, false, null); assertEquals(0, ret); assertEquals(expectedOrder, readJobIdsFromOutput(false)); }
Source:
private static void logCodeMiningProviderException(Throwable e) { if (e.getCause() instanceof CancellationException) { return; } try { String PLUGIN_ID= "org.eclipse.jface.text"; ILog log= Platform.getLog(Platform.getBundle(PLUGIN_ID)); log.log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, e.getMessage(), e)); } catch (Exception ex) { } }

Target:
private static void logCodeMiningProviderException(Throwable e) { if (e != null && (e instanceof CancellationException || (e.getCause() != null && e.getCause() instanceof CancellationException))) { return; } try { String PLUGIN_ID= "org.eclipse.jface.text"; ILog log= Platform.getLog(Platform.getBundle(PLUGIN_ID)); log.log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, e.getMessage(), e)); } catch (Exception ex) { } }
Source:
public void execute() throws MojoExecutionException, MojoFailureException { long start = System.currentTimeMillis(); getLog().debug("Validating Mule application..."); if (!skipValidation) { validateMandatoryFolders(); validateMandatoryDescriptors(); validateMulePluginDependencies(); validateSharedLibraries(); } getLog().debug(MessageFormat.format("Validation for Mule application done ({0}ms)", System.currentTimeMillis() - start)); }

Target:
public void execute() throws MojoExecutionException, MojoFailureException { if (!skipValidation) { long start = System.currentTimeMillis(); getLog().debug("Validating Mule application..."); validateMandatoryFolders(); validateMandatoryDescriptors(); validateMulePluginDependencies(); validateSharedLibraries(); getLog().debug(MessageFormat.format("Validation for Mule application done ({0}ms)", System.currentTimeMillis() - start)); } else { getLog().debug("Skipping Validation for Mule application"); } }
Source:
private static Element getEndpointConfigurationVersionByLatest(NodeList configurationList, Logger log) { Element latestVersion = null; Float valueVersion = 0.0F; for (int confIndex = 0; confIndex < configurationList.getLength(); confIndex++) { Element epConfiguration = (Element) configurationList.item(confIndex); String currentVersionString = getTextContentOf(epConfiguration, "version"); if (currentVersionString.contains("LEVEL")) { if (latestVersion != null) { if (currentVersionString.equals("LEVEL_a1")) { latestVersion = epConfiguration; } } else { latestVersion = epConfiguration; } } else { float currentVersionFloat = toFloat(currentVersionString, log); if (currentVersionFloat > valueVersion) { valueVersion = currentVersionFloat; latestVersion = epConfiguration; } } } return latestVersion; }

Target:
private static Element getEndpointConfigurationVersionByLatest(NodeList configurationList, Logger log) { Element latestVersion = null; Float valueVersion = 0.0F; for (int confIndex = 0; confIndex < configurationList.getLength(); confIndex++) { Element epConfiguration = (Element) configurationList.item(confIndex); String currentVersionString = getTextContentOf(epConfiguration, "version"); if (currentVersionString.toUpperCase().contains("LEVEL")) { if (latestVersion != null) { if (currentVersionString.equalsIgnoreCase("LEVEL_a1")) { latestVersion = epConfiguration; } } else { latestVersion = epConfiguration; } } else { float currentVersionFloat = toFloat(currentVersionString, log); if (currentVersionFloat > valueVersion) { valueVersion = currentVersionFloat; latestVersion = epConfiguration; } } } return latestVersion; }
Source:
@Override public void onDisconnected(IgniteFuture<?> reconnectFut) { synchronized (opsMux) { assert !disconnected; disconnected = true; pendingMasterKey = null; lastChangedMasterKeyDigest = null; cancelFutures("Client node was disconnected from topology (operation result is unknown)."); } }

Target:
@Override public void onDisconnected(IgniteFuture<?> reconnectFut) { synchronized (opsMux) { assert !disconnected; disconnected = true; masterKeyChangeRequest = null; masterKeyDigest = null; cancelFutures("Client node was disconnected from topology (operation result is unknown)."); } }