auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public JsonObject json() { return Json.createObjectBuilder().add("event", this.type).add( "actor", Json.createObjectBuilder().add("login", "test").build() ).add("created_at", "2008-01-14T04:33:35Z").build(); }

Target:
public JsonObject json() { return Json.createObjectBuilder().add("event", this.type).add( "actor", Json.createObjectBuilder().add("login", "test").build() ).add("created_at", new Github.Time().toString()).build(); }
Source:
public VisitRescheduleDto saveVisitReschedule(VisitRescheduleDto visitRescheduleDto, Boolean ignoreLimitation) { VisitBookingDetails visitBookingDetails = visitBookingDetailsDataService.findById(visitRescheduleDto.getVisitBookingDetailsId()); if (visitBookingDetails == null) { throw new IllegalArgumentException("Cannot reschedule, because details for Visit not found"); } Clinic clinic = visitBookingDetails.getClinic(); if (clinic != null && !ignoreLimitation) { checkNumberOfPatients(visitRescheduleDto, clinic); } Visit visit = visitBookingDetails.getVisit(); if (!visitRescheduleDto.getIgnoreDateLimitation()) { validateDate(visitRescheduleDto, visit); } updateVisitPlannedDate(visit, visitRescheduleDto); return new VisitRescheduleDto(updateVisitDetailsWithDto(visitBookingDetails, visitRescheduleDto)); }

Target:
public VisitRescheduleDto saveVisitReschedule(VisitRescheduleDto visitRescheduleDto, Boolean ignoreLimitation) { VisitBookingDetails visitBookingDetails = visitBookingDetailsDataService.findById(visitRescheduleDto.getVisitBookingDetailsId()); if (visitBookingDetails == null) { throw new IllegalArgumentException("Cannot reschedule, because details for Visit not found"); } Clinic clinic = visitBookingDetails.getClinic(); Visit visit = visitBookingDetails.getVisit(); validateDate(visitRescheduleDto, visit); if (clinic != null && !ignoreLimitation) { checkNumberOfPatients(visitRescheduleDto, clinic); } updateVisitPlannedDate(visit, visitRescheduleDto); return new VisitRescheduleDto(updateVisitDetailsWithDto(visitBookingDetails, visitRescheduleDto)); }
Source:
public String docs() { return "void {player, url} Sends a resourcepack URL to the player's client." + " If the client has not been requested to change resources in the" + " past, they will recieve a confirmation dialog before downloading" + " and switching to the new pack. Clients that ignore server resources" + " will not recieve the request, so this function will not affect them." + " This function is no longer useful, use send_resourcepack()."; }

Target:
public String docs() { return "void {player, url} Sends a texturepack URL to the player's client." + " If the client has not been requested to change textures in the" + " past, they will recieve a confirmation dialog before downloading" + " and switching to the new pack. Clients that ignore server textures" + " will not recieve the request, so this function will not affect them."; }
Source:
public void xmlFileFailsToLoad() throws Exception { MockFolder folder = r.createFolder("folder"); assertNotNull(folder); AbstractProject project = folder.createProject(FreeStyleProject.class, "job1"); AbstractProject project2 = folder.createProject(FreeStyleProject.class, "job2"); AbstractProject project3 = folder.createProject(FreeStyleProject.class, "job3"); File configFile = project.getConfigFile().getFile(); List<String> lines = FileUtils.readLines(configFile).subList(0, 5); configFile.delete(); FileUtils.writeByteArrayToFile(configFile, lines.toString().getBytes()); for (int i = lines.size() / 2; i < lines.size(); i++) { FileUtils.writeStringToFile(configFile, lines.get(i), true); } r.jenkins.reload(); assertNotNull("Folder failed to load.", folder); assertNull("Job should have failed to load.", r.jenkins.getItemByFullName("folder/job1")); assertNotNull("Other job in folder should have loaded.", r.jenkins.getItemByFullName("folder/job2")); assertNotNull("Other job in folder should have loaded.", r.jenkins.getItemByFullName("folder/job3")); }

Target:
public void xmlFileFailsToLoad() throws Exception { MockFolder folder = r.createFolder("folder"); assertNotNull(folder); AbstractProject project = folder.createProject(FreeStyleProject.class, "job1"); AbstractProject project2 = folder.createProject(FreeStyleProject.class, "job2"); AbstractProject project3 = folder.createProject(FreeStyleProject.class, "job3"); File configFile = project.getConfigFile().getFile(); List<String> lines = FileUtils.readLines(configFile).subList(0, 5); configFile.delete(); FileUtils.writeByteArrayToFile(configFile, lines.toString().getBytes()); for (int i = lines.size() / 2; i < lines.size(); i++) { FileUtils.writeStringToFile(configFile, lines.get(i), true); } r.jenkins.reload(); assertNotNull("Folder failed to load.", r.jenkins.getItemByFullName("folder")); assertNull("Job should have failed to load.", r.jenkins.getItemByFullName("folder/job1")); assertNotNull("Other job in folder should have loaded.", r.jenkins.getItemByFullName("folder/job2")); assertNotNull("Other job in folder should have loaded.", r.jenkins.getItemByFullName("folder/job3")); }
Source:
private void lubWildcard( AnnotatedTypeMirror type1LowerBound, AnnotatedTypeMirror type1UpperBound, AnnotatedTypeMirror type2LowerBound, AnnotatedTypeMirror type2UpperBound, AnnotatedTypeMirror lubLowerBound, AnnotatedTypeMirror lubUpperBound) { visit(type1UpperBound, type2UpperBound, lubUpperBound); visit(type1LowerBound, type2LowerBound, lubLowerBound); for (AnnotationMirror top : qualifierHierarchy.getTopAnnotations()) { AnnotationMirror anno1 = type1LowerBound.getAnnotationInHierarchy(top); AnnotationMirror anno2 = type2LowerBound.getAnnotationInHierarchy(top); AnnotationMirror glb = null; if (anno1 != null && anno2 != null) { glb = qualifierHierarchy.greatestLowerBound(anno1, anno2); } if (glb != null) { lubLowerBound.replaceAnnotation(glb); } } }

Target:
private void lubWildcard( AnnotatedTypeMirror type1LowerBound, AnnotatedTypeMirror type1UpperBound, AnnotatedTypeMirror type2LowerBound, AnnotatedTypeMirror type2UpperBound, AnnotatedTypeMirror lubLowerBound, AnnotatedTypeMirror lubUpperBound) { visit(type1UpperBound, type2UpperBound, lubUpperBound); visit(type1LowerBound, type2LowerBound, lubLowerBound); for (AnnotationMirror top : qualifierHierarchy.getTopAnnotations()) { AnnotationMirror anno1 = type1LowerBound.getAnnotationInHierarchy(top); AnnotationMirror anno2 = type2LowerBound.getAnnotationInHierarchy(top); AnnotationMirror glb = null; if (anno1 != null && anno2 != null) { glb = qualifierHierarchy.greatestLowerBound(anno1, anno2); lubLowerBound.replaceAnnotation(glb); } } }
Source:
public static String transliterate(String text) { if (tokenizer == null) { tokenizer = new Tokenizer(); } switch (country) { case DEFAULT: return Junidecode.unidecode(text); case JAPAN: return japanese2Romaji(text); } return text; }

Target:
public static String transliterate(String text) { switch (countryName) { case DEFAULT: return Junidecode.unidecode(text); case JAPAN: return japanese2Romaji(text); } return text; }
Source:
public <T extends Storable> T remove(StorableKey key) throws StorageException { Storable storable = (Storable) writer.remove(key); if (storable != null && storable.isCacheable()) { storable = cache.get(key); cache.remove(key); } return (T) storable; }

Target:
public <T extends Storable> T remove(StorableKey key) throws StorageException { Storable storable = (Storable) writer.remove(key); if (storable != null && storable.isCacheable()) { Storable cachedStorable = cache.get(key); if (!storable.equals(cachedStorable)) { LOG.warn("Possible cache inconsistency. Storable from DB '{}', Storable from cache '{}'", storable, cachedStorable); storable = cachedStorable; } cache.remove(key); } return (T) storable; }
Source:
public static void main(String[] args) { TextAnalyticsClient client = new TextAnalyticsClientBuilder() .subscriptionKey("<replace-with-your-text-analytics-key-here>") .endpoint("<replace-with-your-text-analytics-endpoint-here>") .buildClient(); String text = "hello world"; final DetectLanguageResult detectLanguageResult = client.detectLanguage(text, "US"); final DetectedLanguage detectedDocumentLanguage = detectLanguageResult.getPrimaryLanguage(); System.out.printf("Detected primary language: %s, ISO 6391 name: %s, score: %s.%n", detectedDocumentLanguage.getName(), detectedDocumentLanguage.getIso6391Name(), detectedDocumentLanguage.getScore()); final List<DetectedLanguage> detectedLanguages = detectLanguageResult.getDetectedLanguages(); for (DetectedLanguage detectedLanguage : detectedLanguages) { System.out.printf("Other detected languages: %s, ISO 6391 name: %s, score: %s.%n", detectedLanguage.getName(), detectedLanguage.getIso6391Name(), detectedLanguage.getScore()); } }

Target:
public static void main(String[] args) { TextAnalyticsClient client = new TextAnalyticsClientBuilder() .subscriptionKey("{subscription_key}") .endpoint("https://{servicename}.cognitiveservices.azure.com/") .buildClient(); String text = "hello world"; final DetectLanguageResult detectLanguageResult = client.detectLanguage(text, "US"); final DetectedLanguage detectedPrimaryLanguage = detectLanguageResult.getPrimaryLanguage(); System.out.printf("Detected primary language: %s, ISO 6391 name: %s, score: %s.%n", detectedPrimaryLanguage.getName(), detectedPrimaryLanguage.getIso6391Name(), detectedPrimaryLanguage.getScore()); for (DetectedLanguage detectedLanguage : detectLanguageResult.getDetectedLanguages()) { System.out.printf("Another detected language: %s, ISO 6391 name: %s, score: %s.%n", detectedLanguage.getName(), detectedLanguage.getIso6391Name(), detectedLanguage.getScore()); } }
Source:
protected BlobHardRef getRef(Object entity) { try { return (BlobHardRef) super.getValueFromField(this.accessPath.apply(entity)); } catch (Exception e) { throw Exceptions.handle() .to(OMA.LOG) .error(e) .withSystemErrorMessage( "Unable to obtain StoredObjectRef object from entity ref field ('%s' in '%s'): %s (%s)", getName(), descriptor.getType().getName()) .handle(); } }

Target:
protected BlobHardRef getRef(Object entity) { try { return (BlobHardRef) super.getValueFromField(this.accessPath.apply(entity)); } catch (Exception e) { throw Exceptions.handle() .to(OMA.LOG) .error(e) .withSystemErrorMessage( "Unable to obtain a reference object from entity ref field ('%s' in '%s'): %s (%s)", getName(), descriptor.getType().getName()) .handle(); } }
Source:
public final long numberOfBits(final Integer value) { if (value + offset >= (1L << readNofBits)) throw new IllegalArgumentException("Value to be written is bigger then allowed: value=" + value + ", max nof bits=" + readNofBits); return readNofBits; }

Target:
public final long numberOfBits(final Integer value) { return bitsPerValue; }
Source:
public void openPortForwardingAndAdvertise(EntityAndAttribute<Integer> privatePort, Optional<Integer> optionalPublicPort, Protocol protocol, Cidr accessingCidr, EntityAndAttribute<String> whereToAdvertiseEndpoint) { getPortForwarderAsync().openPortForwardingAndAdvertise(privatePort, optionalPublicPort, protocol, accessingCidr, Optional.of(whereToAdvertiseEndpoint), Optional.<EntityAndAttribute<String>>absent()); }

Target:
public void openPortForwardingAndAdvertise(EntityAndAttribute<Integer> privatePort, Optional<Integer> optionalPublicPort, Protocol protocol, Cidr accessingCidr, EntityAndAttribute<String> whereToAdvertiseEndpoint) { getPortForwarderAsync().openPortForwardingAndAdvertise(privatePort, optionalPublicPort, protocol, accessingCidr, whereToAdvertiseEndpoint); }
Source:
private void loadData(final View view) { if ( courseData == null ) return; if (isTaskRunning) { logger.debug("skipping a call to loadData, task is already running"); getHeirarchyTask.setTaskProcessCallback(taskProcessCallback); return; } getHeirarchyTask = new GetCourseOutlineTask(getActivity()) { @Override public void onFinish(ICourse course) { if (course != null) { logger.debug("Start displaying on UI "+ DateUtil.getCurrentTimeStamp()); adapter.setData(course); if(adapter.getCount()==0){ view.findViewById(R.id.no_chapter_tv).setVisibility(View.VISIBLE); } } CourseManager.getSharedInstance().setCourseInView(course); if (adapter.getCount() == 0) { } logger.debug("Completed displaying data on UI "+ DateUtil.getCurrentTimeStamp()); isTaskRunning = false; } @Override public void onException(Exception ex) { if(adapter.getCount()==0) { } isTaskRunning = false; } }; getHeirarchyTask.setTaskProcessCallback(taskProcessCallback); logger.debug("Initializing Chapter Task"+ DateUtil.getCurrentTimeStamp()); isTaskRunning = true; getHeirarchyTask.execute(courseData.getCourse().getId()); }

Target:
private void loadData(final View view) { if ( courseData == null ) return; if (isTaskRunning) { logger.debug("skipping a call to loadData, task is already running"); getHierarchyTask.setTaskProcessCallback(taskProcessCallback); return; } getHierarchyTask = new GetCourseOutlineTask(getActivity()) { @Override public void onFinish(ICourse course) { if (course != null) { logger.debug("Start displaying on UI "+ DateUtil.getCurrentTimeStamp()); adapter.setData(course); if(adapter.getCount()==0){ view.findViewById(R.id.no_chapter_tv).setVisibility(View.VISIBLE); } } CourseManager.getSharedInstance().setCourseInView(course); if (adapter.getCount() == 0) { } logger.debug("Completed displaying data on UI "+ DateUtil.getCurrentTimeStamp()); isTaskRunning = false; } @Override public void onException(Exception ex) { if(adapter.getCount()==0) { } isTaskRunning = false; } }; getHierarchyTask.setTaskProcessCallback(taskProcessCallback); logger.debug("Initializing Chapter Task" + DateUtil.getCurrentTimeStamp()); isTaskRunning = true; getHierarchyTask.execute(courseData.getCourse().getId()); }
Source:
public static boolean waitForServerUp(String hp, long timeout, boolean secure) { long start = Time.currentElapsedTime(); while (true) { try { HostPort hpobj = parseHostPortList(hp).get(0); String result = send4LetterWord(hpobj.host, hpobj.port, "stat", secure); if (result.startsWith("Zookeeper version:") && !result.contains("READ-ONLY")) { return true; } } catch (ConnectException e) { LOG.info("server not up", hp); } catch (IOException e) { LOG.info("server not up", hp, e); } catch (SSLContextException e) { LOG.error("server not up", hp, e); } if (Time.currentElapsedTime() > start + timeout) { break; } try { Thread.sleep(250); } catch (InterruptedException e) { } } return false; }

Target:
public static boolean waitForServerUp(String hp, long timeout, boolean secure) { long start = Time.currentElapsedTime(); while (true) { try { HostPort hpobj = parseHostPortList(hp).get(0); String result = send4LetterWord(hpobj.host, hpobj.port, "stat", secure); if (result.startsWith("Zookeeper version:") && !result.contains("READ-ONLY")) { return true; } } catch (ConnectException e) { LOG.info("server not up: {}", hp, e.toString()); } catch (IOException e) { LOG.info("server not up", hp, e); } catch (SSLContextException e) { LOG.error("server not up", hp, e); } if (Time.currentElapsedTime() > start + timeout) { break; } try { Thread.sleep(250); } catch (InterruptedException e) { } } return false; }
Source:
public void revalidateSession(QuorumPacket qp, LearnerHandler learnerHandler) throws IOException { ByteArrayInputStream bis = new ByteArrayInputStream(qp.getData()); DataInputStream dis = new DataInputStream(bis); long id = dis.readLong(); int to = dis.readInt(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); dos.writeLong(id); boolean valid = zk.checkIfValidGlobalSession(id, to); if (valid) { try { zk.setOwner(id, learnerHandler); } catch (KeeperException.SessionExpiredException e) { LOG.error( "Somehow session expired right after being renewed! (impossible)", Long.toHexString(id), e); } } if (LOG.isTraceEnabled()) { ZooTrace.logTraceMessage( LOG, ZooTrace.SESSION_TRACE_MASK, "Session 0x" + Long.toHexString(id) + " is valid: " + valid); } dos.writeBoolean(valid); qp.setData(bos.toByteArray()); learnerHandler.queuePacket(qp); }

Target:
public void revalidateSession(QuorumPacket qp, LearnerHandler learnerHandler) throws IOException { ByteArrayInputStream bis = new ByteArrayInputStream(qp.getData()); DataInputStream dis = new DataInputStream(bis); long id = dis.readLong(); int to = dis.readInt(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); dos.writeLong(id); boolean valid = zk.checkIfValidGlobalSession(id, to); if (valid) { try { zk.setOwner(id, learnerHandler); } catch (KeeperException.SessionExpiredException e) { LOG.error( "Somehow session 0x{} expired right after being renewed! (impossible)", Long.toHexString(id), e); } } if (LOG.isTraceEnabled()) { ZooTrace.logTraceMessage( LOG, ZooTrace.SESSION_TRACE_MASK, "Session 0x" + Long.toHexString(id) + " is valid: " + valid); } dos.writeBoolean(valid); qp.setData(bos.toByteArray()); learnerHandler.queuePacket(qp); }
Source:
public void writeContent(XMLExtendedStreamWriter writer, ModelMarshallingContext context) throws XMLStreamException { String defaultNamespace = writer.getNamespaceContext().getNamespaceURI(XMLConstants.DEFAULT_NS_PREFIX); ModelNode subsystems = context.getModelNode().get(SUBSYSTEM); boolean empty = !subsystems.has(mainSubsystemName); try { if (!empty) { ModelNode subsystem = subsystems.get(mainSubsystemName); XMLElementWriter<SubsystemMarshallingContext> subsystemWriter = context.getSubsystemWriter(mainSubsystemName); if (subsystemWriter != null) { subsystemWriter.writeContent(writer, new SubsystemMarshallingContext(subsystem, writer)); } } }catch (Throwable t){ Assert.fail("could not marshal subsystem xml: "+t.getMessage()+":\n"+ Arrays.toString(t.getStackTrace()).replaceAll(", ","\n")); } finally { writer.setDefaultNamespace(defaultNamespace); } if (empty){ writer.writeEmptyElement(Element.SUBSYSTEM.getLocalName()); } writer.writeEndDocument(); }

Target:
public void writeContent(XMLExtendedStreamWriter writer, ModelMarshallingContext context) throws XMLStreamException { String defaultNamespace = writer.getNamespaceContext().getNamespaceURI(XMLConstants.DEFAULT_NS_PREFIX); try { ModelNode subsystems = context.getModelNode().get(SUBSYSTEM); if (subsystems.has(mainSubsystemName)) { ModelNode subsystem = subsystems.get(mainSubsystemName); XMLElementWriter<SubsystemMarshallingContext> subsystemWriter = context.getSubsystemWriter(mainSubsystemName); if (subsystemWriter != null) { subsystemWriter.writeContent(writer, new SubsystemMarshallingContext(subsystem, writer)); } }else{ writer.writeEmptyElement(Element.SUBSYSTEM.getLocalName()); } }catch (Throwable t){ Assert.fail("could not marshal subsystem xml: "+t.getMessage()+":\n"+ Arrays.toString(t.getStackTrace()).replaceAll(", ","\n")); } finally { writer.setDefaultNamespace(defaultNamespace); } writer.writeEndDocument(); }
Source:
public void add(GeoLocationParseResult<T> toAdd) { this.successfullyParsed = (this.successfullyParsed == false) ? false : toAdd.isSuccessfullyParsed(); this.items.addAll(toAdd.getItems()); }

Target:
public void add(GeoLocationParseResult<T> toAdd) { this.successfullyParsed = this.successfullyParsed && toAdd.isSuccessfullyParsed(); this.items.addAll(toAdd.getItems()); }
Source:
public PathResult(AnalysisWorkerTask task, TransitLayer transitLayer) { if (task instanceof TravelTimeSurfaceTask) { nDestinations = 1; } else { nDestinations = task.nTargetsPerOrigin(); if (nDestinations > 5000) throw new UnsupportedOperationException("Path results are limited to 5000 " + "destinations"); } this.nIterations = task.getTimeWindowLengthMinutes() * task.getMonteCarloDrawsPerMinute(); itinerariesForPathTemplates = new Multimap[nDestinations]; this.transitLayer = transitLayer; }

Target:
public PathResult(AnalysisWorkerTask task, TransitLayer transitLayer) { if (task instanceof TravelTimeSurfaceTask) { nDestinations = 1; } else { nDestinations = task.nTargetsPerOrigin(); if (nDestinations > 5000) throw new UnsupportedOperationException("Path results are limited to 5000 " + "destinations"); } this.nIterations = task.getTotalIterations(transitLayer.hasFrequencies); itinerariesForPathTemplates = new Multimap[nDestinations]; this.transitLayer = transitLayer; }
Source:
public static MPMetrics getInstance(Context context, String token) { MPMetrics instance = mInstanceMap.get(token); if (instance == null) { instance = new MPMetrics(context.getApplicationContext(), token); mInstanceMap.put(token, instance); } instance.mPushPref.edit().putString("mp_token", token).commit(); return instance; }

Target:
public static MPMetrics getInstance(Context context, String token) { MPMetrics instance = mInstanceMap.get(token); if (instance == null) { instance = new MPMetrics(context.getApplicationContext(), token); mInstanceMap.put(token, instance); } return instance; }
Source:
private String sendRequest(String url) throws IOException { BufferedReader in = null; StringBuilder b = new StringBuilder(); try{ URLConnection urlConnection = new URL(url).openConnection(); in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream(), Charset.forName("utf-8"))); String inputLine = in.readLine(); while (inputLine != null) { b.append(inputLine).append("\n"); inputLine = in.readLine(); } }finally { if(in != null){ try{ in.close(); }catch (IOException e){ log.error("Error occurred while closing BufferedReader"); } } } return b.toString(); }

Target:
private String sendRequest(String url) throws IOException { BufferedReader in = null; StringBuilder b = new StringBuilder(); try{ URLConnection urlConnection = new URL(url).openConnection(); in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream(), Charset.forName("utf-8"))); String inputLine = in.readLine(); while (inputLine != null) { b.append(inputLine).append("\n"); inputLine = in.readLine(); } } finally { IdentityIOStreamUtils.closeReader(in); } return b.toString(); }
Source:
public void addQueues(Queue... queues) { addQueues(Arrays.asList(queues) .stream() .map(Queue::getName) .collect(Collectors.toList())); super.addQueues(queues); }

Target:
public void addQueues(Queue... queues) { try { addQueues(Arrays.stream(queues) .map(Queue::getName)); } catch (AmqpIOException e) { throw new AmqpIOException("Failed to add " + Arrays.asList(queues), e.getCause()); } super.addQueues(queues); }
Source:
public void trackUserSubmitRating(String versionName, int rating) { final FirebaseEvent event = new FirebaseEvent(Events.APP_REVIEWS_SUBMIT_RATING, Values.APP_REVIEWS_SUBMIT_RATING); event.putString(Keys.APP_VERSION, versionName); event.putLong(Keys.RATING, rating); logFirebaseEvent(event.getName(), event.getBundle()); }

Target:
public void trackUserSubmitRating(String versionName, int rating) { final FirebaseEvent event = new FirebaseEvent(Events.APP_REVIEWS_SUBMIT_RATING, Values.APP_REVIEWS_SUBMIT_RATING); event.putString(Keys.CATEGORY, Values.APP_REVIEWS_CATEGORY); event.putString(Keys.APP_VERSION, versionName); event.putInt(Keys.RATING, rating); logFirebaseEvent(event.getName(), event.getBundle()); }
Source:
protected CloudBigtableScanConfiguration( ValueProvider<String> projectId, ValueProvider<String> instanceId, ValueProvider<String> tableId, ValueProvider<ReadRowsRequest> request, Map<String, ValueProvider<String>> additionalConfiguration) { super(projectId, instanceId, tableId, additionalConfiguration); this.request = NestedValueProvider.of( request, new SerializableFunction<ReadRowsRequest, ReadRowsRequest>() { @Override public ReadRowsRequest apply(ReadRowsRequest request) { if (!request.getTableName().isEmpty()) { return request; } BigtableInstanceName bigtableInstanceName = new BigtableInstanceName(getProjectId(), getInstanceId()); String fullTableName = bigtableInstanceName.toTableNameStr(getTableId()); return request.toBuilder().setTableName(fullTableName).build(); } }); }

Target:
protected CloudBigtableScanConfiguration( ValueProvider<String> projectId, ValueProvider<String> instanceId, ValueProvider<String> tableId, ValueProvider<ReadRowsRequest> request, Map<String, ValueProvider<String>> additionalConfiguration) { super(projectId, instanceId, tableId, additionalConfiguration); this.request = new RequestValueProvider(projectId, instanceId, tableId, request); }
Source:
private void onStopObserving(StopObserving message, ActorRef self, ActorRef sender) throws ServletParseException { String senderPath = sender.path().name(); callMap.remove(senderPath); CallInfo callInfo = callDetailsMap.remove(senderPath); if (callInfo != null && callInfo.invite() != null) { if (logger.isDebugEnabled()) { logger.debug("onStopObserving Before: callLocationMap: "+ callLocationMap.toString()); } callLocationMap.remove(callInfo.invite().getAddressHeader(ContactHeader.NAME).getURI().toString()); if (logger.isDebugEnabled()) { logger.debug("onStopObserving After: callLocationMap: "+ callLocationMap.toString()); } } if (callInfo.direction().equalsIgnoreCase("inbound")) { if (logger.isDebugEnabled()) { logger.debug("Removed inbound call from: "+callInfo.from()+" to: "+callInfo.to()); } incomingCallDetailsMap.remove(senderPath); } else { if (logger.isDebugEnabled()) { logger.debug("Removed outbound call from: "+callInfo.from()+" to: "+callInfo.to()); } outgoingCallDetailsMap.remove(senderPath); } callStateMap.remove(senderPath); }

Target:
private void onStopObserving(StopObserving message, ActorRef self, ActorRef sender) throws ServletParseException { String senderPath = sender.path().name(); callMap.remove(senderPath); CallInfo callInfo = callDetailsMap.remove(senderPath); if (callInfo != null && callInfo.invite() != null) { callLocationMap.remove(callInfo.invite().getAddressHeader(ContactHeader.NAME).getURI().toString()); } if (callInfo.direction().equalsIgnoreCase("inbound")) { if (logger.isDebugEnabled()) { logger.debug("Removed inbound call from: "+callInfo.from()+" to: "+callInfo.to()); } incomingCallDetailsMap.remove(senderPath); } else { if (logger.isDebugEnabled()) { logger.debug("Removed outbound call from: "+callInfo.from()+" to: "+callInfo.to()); } outgoingCallDetailsMap.remove(senderPath); } callStateMap.remove(senderPath); }
Source:
private AbstractChannelHandlerContext findContextOutbound(int mask) { AbstractChannelHandlerContext ctx = this; EventExecutor currentExecutor = executor(); do { ctx = ctx.prev; } while (!ChannelHandlerMask.isOutbound(ctx.executionMask) || (ctx.executionMask & mask) == 0 && ctx.executor() == currentExecutor); return ctx; }

Target:
private AbstractChannelHandlerContext findContextOutbound(int mask) { AbstractChannelHandlerContext ctx = this; EventExecutor currentExecutor = executor(); do { ctx = ctx.prev; } while (skipContext(ctx, currentExecutor, mask, MASK_ONLY_OUTBOUND)); return ctx; }
Source:
private void matchBibFile(Path file, String line) { Matcher bibliographyMatch = BIBLIOGRAPHY_PATTERN.matcher(line); while (bibliographyMatch.find()) { Arrays.stream(bibliographyMatch.group(BIBLIOGRAPHY_GROUP).split(",")) .map(bibString -> file.toAbsolutePath().getParent().resolve(bibString.endsWith(BIB_EXT) ? bibString : String.format("%s%s", bibString, BIB_EXT))) .filter(bibFile -> bibFile.toFile().exists()) .forEach(bibFile -> texParserResult.addBibFile(file, bibFile)); } }

Target:
private void matchBibFile(Path file, String line) { Matcher bibliographyMatch = BIBLIOGRAPHY_PATTERN.matcher(line); while (bibliographyMatch.find()) { for (String bibString : bibliographyMatch.group(BIBLIOGRAPHY_GROUP).split(",")) { bibString = bibString.trim(); Path bibFile = file.getParent().resolve( bibString.endsWith(BIB_EXT) ? bibString : String.format("%s%s", bibString, BIB_EXT)); if (bibFile.toFile().exists()) { texParserResult.addBibFile(file, bibFile); } } } }
Source:
private void addEntry(T value) { final HorizontalPanel entry = new HorizontalPanel(); entry.addStyleName(style.entryStyle()); contentPanel.add(entry); final V widget = createWidget(value); Pair<T, V> item = new Pair<T, V>(value, widget); items.add(item); entry.add(widget); PushButton button = createButton(item); entry.add(button); final boolean ghost = isGhost(value); toggleGhost(value, widget, ghost); widget.addValueChangeHandler(new ValueChangeHandler<T>() { private boolean wasGhost = ghost; @Override public void onValueChange(ValueChangeEvent<T> event) { T value = event.getValue(); boolean becomingGhost = isGhost(value); if (becomingGhost != wasGhost) { ((PushButton) entry.getWidget(entry.getWidgetCount() - 1)).setEnabled(!becomingGhost); toggleGhost(value, widget, becomingGhost); wasGhost = becomingGhost; } } }); onAdd(value, widget); }

Target:
private void addEntry(T value) { final V widget = createWidget(value); Pair<T, V> item = new Pair<T, V>(value, widget); items.add(item); PushButton button = createButton(item); final boolean ghost = isGhost(value); toggleGhost(value, widget, ghost); widget.addValueChangeHandler(new ValueChangeHandler<T>() { private boolean wasGhost = ghost; @Override public void onValueChange(ValueChangeEvent<T> event) { T value = event.getValue(); boolean becomingGhost = isGhost(value); if (becomingGhost != wasGhost) { ((AddRemoveRowPanel) widget.getParent()).setButtonEnabled(!becomingGhost); toggleGhost(value, widget, becomingGhost); wasGhost = becomingGhost; } } }); AddRemoveRowPanel entry = new AddRemoveRowPanel(widget, button); contentPanel.add(entry); onAdd(value, widget); }
Source:
public void debugClearMessagesLocally(final List<LocalMessage> messages) { if (!K9.DEBUG) { throw new AssertionError("method must only be used in debug build!"); } putBackground("debugClearLocalMessages", null, new Runnable() { @Override public void run() { for (LocalMessage message : messages) { try { message.debugClearLocalData(); } catch (MessagingException e) { throw new AssertionError("clearing local message content failed!", e); } } } }); }

Target:
public void debugClearMessagesLocally(final List<LocalMessage> messages) { if (!BuildConfig.DEBUG) { throw new AssertionError("method must only be used in debug build!"); } putBackground("debugClearLocalMessages", null, new Runnable() { @Override public void run() { for (LocalMessage message : messages) { try { message.debugClearLocalData(); } catch (MessagingException e) { throw new AssertionError("clearing local message content failed!", e); } } } }); }
Source:
public void createCache(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) { Configuration existing = cacheManager.getCacheConfiguration(name); if (existing == null) { cacheManager.defineConfiguration(name, configuration); log.debugf("Defined cache '%s' on '%s' using %s", name, cacheManager.getAddress(), configuration); } else if (!existing.equals(configuration)) { throw log.incompatibleClusterConfiguration(name, configuration, existing); } else { log.debugf("%s already has a cache %s with configuration %s", cacheManager.getAddress(), name, configuration); } if (flags.contains(CacheContainerAdmin.AdminFlag.PERSISTENT)) { persistentCaches.add(name); storeAll(); } cacheManager.getCache(name); }

Target:
public void createCache(String name, Configuration configuration, EnumSet<CacheContainerAdmin.AdminFlag> flags) { Configuration existing = cacheManager.getCacheConfiguration(name); if (existing == null) { cacheManager.defineConfiguration(name, configuration); log.debugf("Defined cache '%s' on '%s' using %s", name, cacheManager.getAddress(), configuration); } else if (!existing.matches(configuration)) { throw log.incompatibleClusterConfiguration(name, configuration, existing); } else { log.debugf("%s already has a cache %s with configuration %s", cacheManager.getAddress(), name, configuration); } if (flags.contains(CacheContainerAdmin.AdminFlag.PERMANENT)) { persistentCaches.add(name); storeAll(); } cacheManager.getCache(name); }
Source:
public String generateUuid() { String uuid = UUID.randomUUID().toString(); if (useHyphens) { uuid = uuid.replaceAll("-", ""); } return uuid; }

Target:
public String generateUuid() { String uuid = UUID.randomUUID().toString(); if (!useHyphens) { uuid = uuid.replaceAll("-", ""); } return uuid; }
Source:
private InvalidSyntaxError mkException(Parser recognizer, RecognitionException cause) { int line = -1; int column = -1; String msg = null; String sourcePreview = null; Token currentToken = recognizer.getCurrentToken(); if (currentToken != null) { line = currentToken.getLine(); column = currentToken.getCharPositionInLine(); sourcePreview = mkPreview(line); msg = "Offending token is '" + currentToken.getText() + "'"; } return new InvalidSyntaxError(singletonList(new SourceLocation(line, column, sourceName)), msg, sourcePreview, cause); }

Target:
private InvalidSyntaxException mkException(Parser recognizer, RecognitionException cause) { String sourcePreview = null; String offendingToken = null; SourceLocation sourceLocation = null; Token currentToken = recognizer.getCurrentToken(); if (currentToken != null) { int line = currentToken.getLine(); int column = currentToken.getCharPositionInLine(); offendingToken = currentToken.getText(); sourcePreview = mkPreview(line); sourceLocation = new SourceLocation(line, column, sourceName); } return new InvalidSyntaxException(sourceLocation, null, sourcePreview, offendingToken, cause); }
Source:
private static void dumpHadoopCounters(PigStats pigStats) { try { if (props.getBoolean("pig.dump.hadoopCounter", false)) { if (pigStats != null) { JobGraph jGraph = pigStats.getJobGraph(); Iterator<JobStats> iter = jGraph.iterator(); while (iter.hasNext()) { JobStats jobStats = iter.next(); System.out.println("\n === Counters for job: " + jobStats.getJobId() + " ==="); Counters counters = jobStats.getHadoopCounters(); if (counters != null) { for (Counters.Group group : counters) { System.out.println(" Counter Group: " + group.getDisplayName() + " (" + group.getName() + ")"); System.out.println(" number of counters in this group: " + group.size()); for (Counters.Counter counter : group) { System.out.println(" - " + counter.getDisplayName() + ": " + counter.getCounter()); } } } else { System.out.println("There are no counters"); } } } else { System.out.println("pigStats is null, can't dump Hadoop counters"); } } } catch (Exception e) { System.out.println("Unexpected error: " + e.getMessage()); e.printStackTrace(System.out); } }

Target:
private static void dumpHadoopCounters(PigStats pigStats) { try { if (props.getBoolean(PIG_DUMP_HADOOP_COUNTER_PROPERTY, false)) { if (pigStats != null) { JobGraph jGraph = pigStats.getJobGraph(); Iterator<JobStats> iter = jGraph.iterator(); while (iter.hasNext()) { JobStats jobStats = iter.next(); System.out.println("\n === Counters for job: " + jobStats.getJobId() + " ==="); Counters counters = jobStats.getHadoopCounters(); if (counters != null) { for (Counters.Group group : counters) { System.out.println(" Counter Group: " + group.getDisplayName() + " (" + group.getName() + ")"); System.out.println(" number of counters in this group: " + group.size()); for (Counters.Counter counter : group) { System.out.println(" - " + counter.getDisplayName() + ": " + counter.getCounter()); } } } else { System.out.println("There are no counters"); } } } else { System.out.println("pigStats is null, can't dump Hadoop counters"); } } } catch (Exception e) { System.out.println("Unexpected error: " + e.getMessage()); e.printStackTrace(System.out); } }
Source:
public static Optional<Server> getServer(io.swagger.oas.annotations.servers.Server server) { if (server == null) { return Optional.empty(); } Server serverObject = new Server(); serverObject.setUrl(server.url()); serverObject.setDescription(server.description()); io.swagger.oas.annotations.servers.ServerVariable[] serverVariables = server.variables(); ServerVariables serverVariablesObject = new ServerVariables(); for (io.swagger.oas.annotations.servers.ServerVariable serverVariable : serverVariables) { ServerVariable serverVariableObject = new ServerVariable(); serverVariableObject.setDescription(serverVariable.description()); serverVariablesObject.addServerVariable(serverVariable.name(), serverVariableObject); } serverObject.setVariables(serverVariablesObject); return Optional.of(serverObject); }

Target:
public static Optional<Server> getServer(io.swagger.oas.annotations.servers.Server server) { if (server == null) { return Optional.empty(); } Server serverObject = new Server(); if (StringUtils.isNotBlank(server.url())) { serverObject.setUrl(server.url()); } if (StringUtils.isNotBlank(server.description())) { serverObject.setDescription(server.description()); } io.swagger.oas.annotations.servers.ServerVariable[] serverVariables = server.variables(); ServerVariables serverVariablesObject = new ServerVariables(); for (io.swagger.oas.annotations.servers.ServerVariable serverVariable : serverVariables) { ServerVariable serverVariableObject = new ServerVariable(); if (StringUtils.isNotBlank(serverVariable.description())) { serverVariableObject.setDescription(serverVariable.description()); } serverVariablesObject.addServerVariable(serverVariable.name(), serverVariableObject); } serverObject.setVariables(serverVariablesObject); return Optional.of(serverObject); }
Source:
public int visit(IASTDeclSpecifier declSpec) { if (declSpec.isConst()) { String rawSignature = declSpec.getRawSignature(); if (!expectConstRight && !rawSignature.startsWith(Keywords.CONST)) { declSpecifiersWithMisalignedConst.add(declSpec); } else if (expectConstRight && !rawSignature.endsWith(Keywords.CONST)) { declSpecifiersWithMisalignedConst.add(declSpec); } } return PROCESS_CONTINUE; }

Target:
public int visit(IASTDeclSpecifier declSpec) { if (declSpec.isConst()) { String rawSignature = declSpec.getRawSignature(); rawSignature = rawSignature.replace(Keywords.VOLATILE, "").trim(); if (!expectConstRight && !startsWithConst(rawSignature)) { declSpecifiersWithMisalignedConst.add(declSpec); } else if (expectConstRight && !endsWithConst(rawSignature)) { declSpecifiersWithMisalignedConst.add(declSpec); } } return PROCESS_CONTINUE; }
Source:
private String[] getRoles(Set<Principal> principals) { List<String> roles = new ArrayList<>(); for (Principal principal : principals) { roles.add(principal.getName()); } return roles.toArray(new String[roles.size()]); }

Target:
private String[] getRoles(Set<Principal> principals) { String[] roles = new String[principals.size()]; int i = 0; for (Principal principal : principals) { roles[i++] = principal.getName(); } return roles; }
Source:
private void growup() { if (values.length == capacity()) { throw new IllegalStateException("This matrix can't grow up."); } int c = rows * columns < 0 ? Integer.MAX_VALUE : rows * columns; int capacity = Math.min(c, (cardinality * 3) / 2 + 1); double $values[] = new double[capacity]; int $columnIndices[] = new int[capacity]; System.arraycopy(values, 0, $values, 0, cardinality); System.arraycopy(columnIndices, 0, $columnIndices, 0, cardinality); values = $values; columnIndices = $columnIndices; }

Target:
private void growup() { if (values.length == capacity()) { throw new IllegalStateException("This matrix can't grow up."); } int min = rows * columns; min = min < 0 ? Integer.MAX_VALUE : min; int capacity = Math.min(min, (cardinality * 3) / 2 + 1); double $values[] = new double[capacity]; int $columnIndices[] = new int[capacity]; System.arraycopy(values, 0, $values, 0, cardinality); System.arraycopy(columnIndices, 0, $columnIndices, 0, cardinality); values = $values; columnIndices = $columnIndices; }
Source:
private Pair<Number, Number> tryConvergeVolatileOSMetrics(String attribute, Function<OSMetrics, Number> func) { try { Number cdsValue = 0; Number osMetricValue = -1; for (int i = 0; i < 5; i++) { CompositeDataSupport cds = (CompositeDataSupport) getPlatformMBeanServer() .invoke(mbeanObjectName, "showOSMetrics", null, null); cdsValue = (Number) cds.get(attribute); osMetricValue = func.apply(getMXBeanProxy().showOSMetrics()); if (cdsValue.equals(osMetricValue)) { break; } System.gc(); System.runFinalization(); } return Pair.of(cdsValue, osMetricValue); } catch (Exception ex) { return null; } }

Target:
private void tryConvergeVolatileOSMetrics(String attribute, Function<OSMetrics, Number> func) { GeodeAwaitility.await(attribute).atMost(SAMPLE_RATE * 5, TimeUnit.MILLISECONDS) .untilAsserted(() -> { CompositeDataSupport cds = (CompositeDataSupport) getPlatformMBeanServer() .invoke(mbeanObjectName, "showOSMetrics", null, null); Number cdsValue = (Number) cds.get(attribute); Number osMetricValue = func.apply(getMXBeanProxy().showOSMetrics()); assertThat(cdsValue).isEqualTo(osMetricValue); }); }
Source:
protected Locale getLocaleFromRequest(final HttpServletRequest request) { String localeString = getLocaleStringFromReferer(request); if (null == localeString) { localeString = getLocaleStringFromPath(request.getPathInfo()); } Locale locale = LocaleUtils.getLocaleFromString(localeString, true); return locale; }

Target:
protected Locale getLocaleFromRequest(final HttpServletRequest request) { String localeString = getLocaleStringFromReferer(request); if (localeString == null) { localeString = getLocaleStringFromPath(request.getPathInfo()); } Locale locale = LocaleUtils.getLocaleFromString(localeString, true); return locale; }
Source:
public static File getOpennlpDataDir() { return new File(System.getProperty("OPENNLP_DATA_DIR")); }

Target:
public static File getOpennlpDataDir() throws FileNotFoundException { final String dataDirectory = System.getProperty("OPENNLP_DATA_DIR"); if (StringUtil.isEmpty(dataDirectory)) { throw new IllegalArgumentException("The OPENNLP_DATA_DIR is not set."); } final File file = new File(System.getProperty("OPENNLP_DATA_DIR")); if (!file.exists()) { throw new FileNotFoundException("The OPENNLP_DATA_DIR path of " + dataDirectory + " was not found."); } return file; }
Source:
private void drawRevenue() { int minY = Integer.MAX_VALUE, maxY = 0; Date lastDate = null; for (Rank rank : ranks) { int gap = 0; if (rank.revenue.intValue() < minY) { minY = rank.revenue.intValue(); } if (rank.revenue.intValue() > maxY) { maxY = rank.revenue.intValue(); } if (lastDate != null && (gap = CalendarUtil.getDaysBetween(lastDate, rank.date)) > 1) { for (int i = 0; i < gap; i++) { CalendarUtil.addDaysToDate(lastDate, 1); curve.addPoint(lastDate.getTime(), Integer.MAX_VALUE); } } else { lastDate = CalendarUtil.copyDate(rank.date); curve.addPoint(rank.date.getTime(), (showModelPredictions) ? rank.revenue.floatValue() : 0); } } setYAxisRange(minY, maxY); }

Target:
private void drawRevenue() { int minY = Integer.MAX_VALUE, maxY = 0; Date lastDate = null; for (Rank rank : ranks) { int gap = 0; if (rank.revenue.intValue() < minY) { minY = rank.revenue.intValue(); } if (rank.revenue.intValue() > maxY) { maxY = rank.revenue.intValue(); } if (lastDate != null && (gap = CalendarUtil.getDaysBetween(lastDate, rank.date)) > 1) { for (int i = 0; i < gap; i++) { CalendarUtil.addDaysToDate(lastDate, 1); curve.addPoint(lastDate.getTime(), Integer.MAX_VALUE); } } else { lastDate = CalendarUtil.copyDate(rank.date); curve.addPoint(rank.date.getTime(), (showModelPredictions ? rank.revenue.floatValue() : 0)); } } setYAxisRange(minY, maxY); }
Source:
public void activate() { logger.debug("activate() is called!"); }

Target:
public void activate() { logger.trace("activate() is called!"); }
Source:
public void testSerializeUserListMessage() throws IOException { List<String> usernames = userList.getUsernames(); Hashtable<String, String> users = userList.getUsers(); UserListMessage oldMessage = new UserListMessage(); oldMessage.setUserList(userList); UserListMessage newMessage = super.testSerializeMessage(oldMessage); for(int i = 0; i < userList.getUsers().size(); i++) { System.out.println(i); assertEquals(usernames.get(i), newMessage.getUserList().getUsernames().get(i)); assertEquals(users.get(usernames.get(i)), newMessage.getUserList().getUsers().get(newMessage.getUserList().getUsernames().get(i))); } }

Target:
public void testSerializeUserListMessage() throws IOException { UserList userList = new UserList(); populateTestUserList(userList); List<String> usernames = userList.getUsernames(); UserListMessage preSerializationUserListMessage = new UserListMessage(); preSerializationUserListMessage.setUserList(userList); UserListMessage postSerializationUserListMessage = super.testSerializeMessage(preSerializationUserListMessage); for(int i = 0; i < usernames.size(); i++) { assertEquals(usernames.get(i), postSerializationUserListMessage.getUserList().getUsernames().get(i)); } }
Source:
protected void authenticatePacketHMAC(RawPacket pkt, int rocIn) { mac.update(pkt.getBuffer(), pkt.getOffset(), pkt.getLength()); rbStore[0] = (byte) (rocIn >> 24); rbStore[1] = (byte) (rocIn >> 16); rbStore[2] = (byte) (rocIn >> 8); rbStore[3] = (byte) rocIn; mac.update(rbStore, 0, rbStore.length); mac.doFinal(tagStore, 0); }

Target:
synchronized protected void authenticatePacketHMAC(RawPacket pkt, int rocIn) { mac.update(pkt.getBuffer(), pkt.getOffset(), pkt.getLength()); rbStore[0] = (byte) (rocIn >> 24); rbStore[1] = (byte) (rocIn >> 16); rbStore[2] = (byte) (rocIn >> 8); rbStore[3] = (byte) rocIn; mac.update(rbStore, 0, rbStore.length); mac.doFinal(tagStore, 0); }
Source:
static public boolean sendXMPP( @ParamDoc(name="to") String to, @ParamDoc(name="message") String message) { boolean success = false; try { XMPPConnection conn = XMPPConnect.getConnection(); ChatManager chatmanager = ChatManager.getInstanceFor(conn); Chat newChat = chatmanager.createChat(to, null); try { while(message.length()>=2000) { newChat.sendMessage(message.substring(0, 2000)); message = message.substring(2000); } newChat.sendMessage(message); logger.debug("Sent message '{}' to '{}'.", message, to); success = true; } catch (XMPPException e) { System.out.println("Error Delivering block"); } catch (NotConnectedException e) { System.out.println("Error Delivering block"); } } catch (NotInitializedException e) { logger.warn("Could not send XMPP message as connection is not correctly initialized!"); } return success; }

Target:
static public boolean sendXMPP( @ParamDoc(name="to") String to, @ParamDoc(name="message") String message) { boolean success = false; try { XMPPConnection conn = XMPPConnect.getConnection(); ChatManager chatmanager = ChatManager.getInstanceFor(conn); Chat newChat = chatmanager.createChat(to, null); try { while(message.length()>=2000) { newChat.sendMessage(message.substring(0, 2000)); message = message.substring(2000); } newChat.sendMessage(message); logger.debug("Sent message '{}' to '{}'.", message, to); success = true; } catch (XMPPException e) { logger.warn("Error Delivering block", e); } catch (NotConnectedException e) { logger.warn("Error Delivering block", e); } } catch (NotInitializedException e) { logger.warn("Could not send XMPP message as connection is not correctly initialized!"); } return success; }
Source:
public BenchmarkSuiteInfo( @ColumnName("suite") String suite, @ColumnName("query_set") String querySet, @ColumnName("phases") List<PhaseSpecification> phases, @ColumnName("session_properties") Map<String, String> sessionProperties) { this.suite = requireNonNull(suite, "suite is null"); this.querySet = requireNonNull(querySet, "query_set is null"); this.phases = requireNonNull(phases, "phases is null"); this.sessionProperties = ImmutableMap.copyOf(sessionProperties); }

Target:
public BenchmarkSuiteInfo( @ColumnName("suite") String suite, @ColumnName("query_set") String querySet, @ColumnName("phases") List<PhaseSpecification> phases, @ColumnName("session_properties") Map<String, String> sessionProperties) { this.suite = requireNonNull(suite, "suite is null"); this.querySet = requireNonNull(querySet, "querySet is null"); this.phases = requireNonNull(phases, "phases is null"); this.sessionProperties = ImmutableMap.copyOf(sessionProperties); }
Source:
private void append(CharSequence csq) { try { out.append(csq); } catch (IOException e) { throw new AssertionError(e); } }

Target:
private void append(CharSequence csq) { try { out.append(csq); } catch (IOException e) { throw new EmitRuntimeException(e); } }