auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onTextSelected(ActionMode mode) { MenuItem shareItem = null; webViewActionMode = mode; Menu menu = mode.getMenu(); for (int i = 0; i < menu.size(); i++) { MenuItem item = menu.getItem(i); try { String resourceName = activity.getResources().getResourceName(item.getItemId()); if (resourceName.contains("share")) { shareItem = item; } if (!ApiUtil.hasLollipop()) { fixMenuItemTheme(item); } } catch (Resources.NotFoundException e) { } } if (shareItem == null) { shareItem = mode.getMenu().add(Menu.NONE, Menu.NONE, Menu.NONE, activity.getString(R.string.menu_share_page)); shareItem.setIcon(R.drawable.ic_share_dark); MenuItemCompat.setShowAsAction(shareItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); } shareItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { requestTextSelection(); if (webViewActionMode != null) { webViewActionMode.finish(); webViewActionMode = null; } return true; } }); createFunnel(); funnel.logHighlight(); }

Target:
public void onTextSelected(ActionMode mode) { webViewActionMode = mode; Menu menu = mode.getMenu(); MenuItem shareItem = getSystemMenuItemByName(menu, "share"); if (shareItem == null) { shareItem = mode.getMenu().add(Menu.NONE, Menu.NONE, Menu.NONE, activity.getString(R.string.menu_share_page)); shareItem.setIcon(R.drawable.ic_share_dark); MenuItemCompat.setShowAsAction(shareItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); } shareItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { requestTextSelection(); if (webViewActionMode != null) { webViewActionMode.finish(); webViewActionMode = null; } return true; } }); createFunnel(); funnel.logHighlight(); }
Source:
private BoundedContext selectBoundedContext(Target target) { TypeUrl type = TypeUrl.parse(target.getType()); BoundedContext result = typeToContextMap.get(type); if (result == null) { throw newIllegalArgumentException("Trying to subscribe to an unknown type: %s", type); } return result; }

Target:
private Optional<BoundedContext> selectBoundedContext(Target target) { TypeUrl type = TypeUrl.parse(target.getType()); BoundedContext selected = typeToContextMap.get(type); Optional<BoundedContext> result = Optional.ofNullable(selected); return result; }
Source:
public Object perform(InvocationContext ctx) throws Throwable { if (mutations == null || mutations.isEmpty()) { return super.perform(ctx); } MVCCEntry<K, V> entry = (MVCCEntry<K, V>) ctx.lookupEntry(key); EntryView.ReadWriteEntryView<K, V> rw = EntryViews.readWrite(entry); Object ret = null; for (Mutation<K, V, ?> mutation : mutations) { ret = mutation.apply(rw); entry.updatePreviousValue(); } if (f != null) { ret = f.apply(rw); } return snapshot(ret, new CacheEncoders()); }

Target:
public Object perform(InvocationContext ctx) throws Throwable { if (mutations == null || mutations.isEmpty()) { return super.perform(ctx); } MVCCEntry<K, V> entry = (MVCCEntry<K, V>) ctx.lookupEntry(key); EntryView.ReadWriteEntryView<K, V> rw = EntryViews.readWrite(entry, cacheEncoders); Object ret = null; for (Mutation<K, V, ?> mutation : mutations) { ret = mutation.apply(rw); entry.updatePreviousValue(); } if (f != null) { ret = f.apply(rw); } return snapshot(ret); }
Source:
public void testMultipleHandles() throws CRException, IOException { GenericConfiguration config = new GenericConfiguration(); GenericConfigurationFileLoader.load(config, "${" + CRUtil.PORTALNODE_CONFPATH + "}/multipleDatasourceHandle.properties"); CRConfigUtil crConfig = new CRConfigUtil(config,"crConfig"); assertNotNull(crConfig); crConfig.initDS(); assertNotNull(crConfig.getRequestProcessorConfig(1)); assertNotNull(crConfig.getRequestProcessorConfig(1).getDatasource()); assertNotNull(crConfig.getRequestProcessorConfig(1).getDatasource().getHandlePool()); Datasource ds = crConfig.getRequestProcessorConfig(1).getDatasource(); assertNotEquals(ds.getHandlePool().getHandle(), ds.getHandlePool().getHandle()); }

Target:
public void testMultipleHandles() throws CRException, IOException { GenericConfiguration config = new GenericConfiguration(); GenericConfigurationFileLoader.load(config, "${" + CRUtil.PORTALNODE_CONFPATH + "}/multipleDatasourceHandle.properties"); CRConfigUtil crConfig = new CRConfigUtil(config, "crConfig"); assertNotNull("crConfig is null", crConfig); crConfig.initDS(); assertNotNull("first request processor is null", crConfig.getRequestProcessorConfig(1)); assertNotNull("datasource is null", crConfig.getRequestProcessorConfig(1).getDatasource()); Datasource ds = crConfig.getRequestProcessorConfig(1).getDatasource(); assertNotNull("datasource handlePool is null", ds.getHandlePool()); assertNotEquals("both fetched datasource handles are the same", ds .getHandlePool().getHandle(), ds.getHandlePool().getHandle()); }
Source:
public void actionPerformed(ActionEvent e) { final Object source = e.getSource(); if (source == cancelButton) { resetJDialog(); this.dispose(); } else if (source == applyTemplateButton) { String selectedTemplate = templateList.getText(); Template template = TemplateManager.getInstance().getTemplateByName(selectedTemplate); if(template.getParameters() != null && !template.getParameters().isEmpty()) { this.setContentPane(configureParametersPanel(template.getParameters())); this.revalidate(); }else { checkDirtyAndLoad(e); } } else if (source == reloadTemplateButton || source == previous) { resetJDialog(); } else if(source == validateButton) { checkDirtyAndLoad(e); resetJDialog(); } }

Target:
public void actionPerformed(ActionEvent e) { final Object source = e.getSource(); if (source == cancelButton) { resetJDialog(); this.dispose(); } else if (source == applyTemplateButton) { String selectedTemplate = templateList.getText(); Template template = TemplateManager.getInstance().getTemplateByName(selectedTemplate); if (hasParameters(template)) { this.setContentPane(configureParametersPanel(template.getParameters())); this.revalidate(); } else { checkDirtyAndLoad(e); } } else if (source == reloadTemplateButton || source == previous) { resetJDialog(); } else if (source == validateButton) { checkDirtyAndLoad(e); resetJDialog(); } }
Source:
void handleDomainObjectSelectedEvent(final @Observes DomainObjectSelectionEvent event) { checkNotNull("event", event); if (Objects.equals(getCanvasHandler(), event.getCanvasHandler())) { selectedDomainObject = Optional.of(event.getDomainObject()); } }

Target:
void handleDomainObjectSelectedEvent(final @Observes DomainObjectSelectionEvent event) { checkNotNull("event", event); if (Objects.equals(getCanvasHandler(), event.getCanvasHandler())) { selectedDomainObject = Optional.ofNullable(event.getDomainObject()); } }
Source:
private VirtualMachine cloneMaster(VirtualMachine master, String tag, String name, VirtualMachineCloneSpec cloneSpec, String folderName) { VirtualMachine cloned = null; try { FolderNameToFolderManagedEntity toFolderManagedEntity = new FolderNameToFolderManagedEntity(serviceInstance, master); Folder folder = toFolderManagedEntity.apply(folderName); Task task = master.cloneVM_Task(folder, name, cloneSpec); String result = task.waitForTask(); if (result.equals(Task.SUCCESS)) { while (cloned == null) { logger.trace("<< after clone search for VM with name: " + name); cloned = getVM(name, folder); if (cloned == null) folder = serviceInstance.get().getInstance().getRootFolder(); else break; sleep(500); } } else { String errorMessage = task.getTaskInfo().getError().getLocalizedMessage(); logger.error(errorMessage); } } catch (Exception e) { logger.error("Can't clone vm: " + e.toString(), e); propagate(e); } return checkNotNull(cloned, "cloned"); }

Target:
private VirtualMachine cloneMaster(VirtualMachine master, String tag, String name, VirtualMachineCloneSpec cloneSpec, String folderName) { VirtualMachine cloned = null; try { FolderNameToFolderManagedEntity toFolderManagedEntity = new FolderNameToFolderManagedEntity(serviceInstance, master); Folder folder = toFolderManagedEntity.apply(folderName); Task task = master.cloneVM_Task(folder, name, cloneSpec); String result = task.waitForTask(); if (result.equals(Task.SUCCESS)) { logger.trace("<< after clone search for VM with name: " + name); Retryer<VirtualMachine> retryer = RetryerBuilder.<VirtualMachine>newBuilder() .retryIfResult(Predicates.<VirtualMachine>isNull()) .withStopStrategy(StopStrategies.stopAfterAttempt(5)) .retryIfException().withWaitStrategy(WaitStrategies.fixedWait(1, TimeUnit.SECONDS)) .build(); cloned = retryer.call(new GetVirtualMachineCallable(name, folder, serviceInstance.get().getInstance().getRootFolder())); } else { String errorMessage = task.getTaskInfo().getError().getLocalizedMessage(); logger.error(errorMessage); } } catch (Exception e) { if (e instanceof NoPermission){ NoPermission noPermission = (NoPermission)e; logger.error("NoPermission: " + noPermission.getPrivilegeId()); } logger.error("Can't clone vm: " + e.toString(), e); propagate(e); } if (cloned == null) logger.error("<< Failed to get cloned VM. " + name); return checkNotNull(cloned, "cloned"); }
Source:
private CookieSpec getCookieSpec(final HttpState state) { if (this.cookiespec == null) { int i = state.getCookiePolicy(); if (i == -1) { this.cookiespec = CookiePolicy.getCookieSpec(this.params.getCookiePolicy()); } else { this.cookiespec = CookiePolicy.getSpecByPolicy(i); } this.cookiespec.setValidDateFormats( (Collection<?>)this.params.getParameter(HttpMethodParams.DATE_PATTERNS)); } return this.cookiespec; }

Target:
private CookieSpec getCookieSpec(final HttpState state) { if (this.cookiespec == null) { int i = state.getCookiePolicy(); if (i == -1) { this.cookiespec = CookiePolicy.getCookieSpec(this.params.getCookiePolicy()); } else { this.cookiespec = CookiePolicy.getSpecByPolicy(i); } this.cookiespec.setValidDateFormats( (Collection)this.params.getParameter(HttpMethodParams.DATE_PATTERNS)); } return this.cookiespec; }
Source:
public List<ProgramState> constrain(ProgramState state, Constraint constraint) { if (constraint.isStricterOrEqualTo(Constraint.TRUTHY)) { return firstOperandValue.constrain(state, secondOperandConstraint); } else if (constraint.isStricterOrEqualTo(Constraint.FALSY)) { return firstOperandValue.constrain(state, secondOperandConstraint.not()); } return ImmutableList.of(state); }

Target:
public List<ProgramState> constrain(ProgramState state, Constraint constraint) { if (constraint.equals(Constraint.TRUTHY)) { return firstOperandValue.constrain(state, secondOperandConstraint); } else if (constraint.equals(Constraint.FALSY)) { return firstOperandValue.constrain(state, secondOperandConstraint.not()); } return ImmutableList.of(); }
Source:
public void line(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { Pattern pattern = we.getBlockPattern(player, args.getString(0)); Region region = session.getSelection(session.getSelectionWorld()); Vector pos1 = ((CuboidRegion) region).getPos1(); Vector pos2 = ((CuboidRegion) region).getPos2(); int blocksChanged = editSession.drawLine(region, pattern, pos1, pos2); player.print(blocksChanged + " block(s) have been changed."); }

Target:
public void line(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { Region region = session.getSelection(session.getSelectionWorld()); if (!(region instanceof CuboidRegion)) { player.printError("Invalid region type"); return; } if (args.argsLength() < 2 ? false : args.getDouble(1) < 0) { player.printError("Invalid thickness. Must not be negative"); return; } Pattern pattern = we.getBlockPattern(player, args.getString(0)); CuboidRegion cuboidregion = (CuboidRegion) region; Vector pos1 = cuboidregion.getPos1(); Vector pos2 = cuboidregion.getPos2(); int blocksChanged = editSession.drawLine(pattern, pos1, pos2, args.argsLength() < 2 ? 0 : args.getDouble(1), !args.hasFlag('h')); player.print(blocksChanged + " block(s) have been changed."); }
Source:
public ListenerResource( final @Json ObjectMapper jsonMapper, final @Smile ObjectMapper smileMapper, final ListenerHandler handler ) { this.jsonMapper = Preconditions.checkNotNull(jsonMapper); this.smileMapper = smileMapper; this.handler = handler; }

Target:
public ListenerResource( final @Json ObjectMapper jsonMapper, final @Smile ObjectMapper smileMapper, final ListenerHandler handler ) { this.jsonMapper = Preconditions.checkNotNull(jsonMapper, "jsonMapper"); this.smileMapper = Preconditions.checkNotNull(smileMapper, "smileMapper"); this.handler = Preconditions.checkNotNull(handler, "listener handler"); }
Source:
public void execute(ExecuteCommandParams params) { if (CLIENT_UPDATE_PROJECTS_CLASSPATH.equals(params.getCommand())) { for (Object project : params.getArguments()) { eventBus.fireEvent( new ExternalLibrariesUpdateEvent(removePrefixUri(String.valueOf(project)))); } } }

Target:
public void execute(ExecuteCommandParams params) { if (CLIENT_UPDATE_PROJECTS_CLASSPATH.equals(params.getCommand())) { for (Object project : params.getArguments()) { eventBus.fireEvent(new ProjectClasspathChangedEvent(stringValue(project))); } } }
Source:
public void handleEvent(){ String message = "Edit the port to be exposed by the service"; final IServicePort port = model.getSelectedServicePort(); final ServicePortAdapter target = new ServicePortAdapter(port); final boolean previousRoutePort = model.getRoutingPort() == port; ServicePortDialog dialog = new ServicePortDialog(target, message, model.getServicePorts(), previousRoutePort); if(Window.OK == dialog.open()) { target.setName(NLS.bind("{0}-tcp", target.getPort())); model.updateServicePort(port, target); model.setSelectedServicePort(target); boolean routePort = dialog.isRoutePort(); if (routePort != previousRoutePort) { model.setRoutingPort(routePort?target:null); portsViewer.refresh(); } } }

Target:
public void handleEvent(){ String message = "Edit the port to be exposed by the service"; final IServicePort port = model.getSelectedServicePort(); final ServicePortAdapter target = new ServicePortAdapter((ServicePortAdapter)port); ServicePortDialog dialog = new ServicePortDialog(target, message, model.getServicePorts()); if(Window.OK == dialog.open()) { target.setName(NLS.bind("{0}-tcp", target.getPort())); model.updateServicePort(port, target); model.setSelectedServicePort(target); } }
Source:
public PartitionIterator resolve() { int count = responses.size(); List<UnfilteredPartitionIterator> iters = new ArrayList<>(count); Replica[] sources = new Replica[count]; for (int i = 0; i < count; i++) { MessageIn<ReadResponse> msg = responses.get(i); iters.add(msg.payload.makeIterator(command)); Replica replica = replicaMap.get(msg.from); if (replica == null) replica = command.decorateEndpoint(msg.from); if (replica == null) replica = Replica.fullStandin(msg.from); sources[i] = replica != null ? replica : Replica.fullStandin(msg.from); } DataLimits.Counter mergedResultCounter = command.limits().newCounter(command.nowInSec(), true, command.selectsFullPartition(), enforceStrictLiveness); UnfilteredPartitionIterator merged = mergeWithShortReadProtection(iters, sources, mergedResultCounter); FilteredPartitions filtered = FilteredPartitions.filter(merged, new Filter(command.nowInSec(), command.metadata().enforceStrictLiveness())); PartitionIterator counted = Transformation.apply(filtered, mergedResultCounter); return Transformation.apply(counted, new EmptyPartitionsDiscarder()); }

Target:
public PartitionIterator resolve() { int count = responses.size(); List<UnfilteredPartitionIterator> iters = new ArrayList<>(count); Replica[] sources = new Replica[count]; for (int i = 0; i < count; i++) { MessageIn<ReadResponse> msg = responses.get(i); iters.add(msg.payload.makeIterator(command)); Replica replica = replicaMap.get(msg.from); if (replica == null) replica = command.decorateEndpoint(msg.from); assert replica != null; sources[i] = replica; } DataLimits.Counter mergedResultCounter = command.limits().newCounter(command.nowInSec(), true, command.selectsFullPartition(), enforceStrictLiveness); UnfilteredPartitionIterator merged = mergeWithShortReadProtection(iters, sources, mergedResultCounter); FilteredPartitions filtered = FilteredPartitions.filter(merged, new Filter(command.nowInSec(), command.metadata().enforceStrictLiveness())); PartitionIterator counted = Transformation.apply(filtered, mergedResultCounter); return Transformation.apply(counted, new EmptyPartitionsDiscarder()); }
Source:
public void testAllRestPropertiesEnabled() throws Exception { Config config = new Config(); config.getNetworkConfig().getMemcacheProtocolConfig().setEnabled(true); config.getNetworkConfig().getRestApiConfig().setEnabled(true); HazelcastInstance hz = factory.newHazelcastInstance(config); hz.getMap("test").put("testKey", "testValue"); assertTextProtocolResponse(hz, TEST_URL_DATA); }

Target:
public void testAllRestPropertiesEnabled() throws Exception { Config config = new Config(); config.getNetworkConfig().getMemcacheProtocolConfig().setEnabled(true); RestApiConfig restApiConfig = config.getNetworkConfig().getRestApiConfig(); restApiConfig.setEnabled(true); restApiConfig.enableGroups(DATA); HazelcastInstance hz = factory.newHazelcastInstance(config); hz.getMap("test").put("testKey", "testValue"); assertTextProtocolResponse(hz, TEST_URL_DATA); }
Source:
public boolean clearStream(StreamSpec streamSpec) { LOG.info("Creating Kafka topic: on system: {}", streamSpec.getPhysicalName(), streamSpec.getSystemName()); String topicName = streamSpec.getPhysicalName(); try { DeleteTopicsResult deleteTopicsResult = adminClient.deleteTopics(ImmutableSet.of(topicName)); deleteTopicsResult.all().get(KAFKA_ADMIN_OPS_TIMEOUT_MS, TimeUnit.MILLISECONDS); } catch (Exception e) { LOG.error("Failed to delete topic with exception " + topicName + "\n" + e + "\n" + e.getCause()); return false; } return true; }

Target:
public boolean clearStream(StreamSpec streamSpec) { LOG.info("Creating Kafka topic: on system: {}", streamSpec.getPhysicalName(), streamSpec.getSystemName()); String topicName = streamSpec.getPhysicalName(); try { DeleteTopicsResult deleteTopicsResult = adminClient.deleteTopics(ImmutableSet.of(topicName)); deleteTopicsResult.all().get(KAFKA_ADMIN_OPS_TIMEOUT_MS, TimeUnit.MILLISECONDS); } catch (Exception e) { LOG.error("Failed to delete topic with exception {}.", topicName, e); return false; } return true; }
Source:
protected void schedulePublish(long delay) { if (isRunning() && executorQueued.compareAndSet(false, true)) { long now = System.currentTimeMillis(); delay = Math.max(0, Math.max(delay, (executorTime + 100) - now)); if (LOG.isTraceEnabled()) LOG.trace("{} scheduling publish in {}ms", this, delay); Runnable job = new Runnable() { @Override public void run() { try { executorTime = System.currentTimeMillis(); executorQueued.set(false); publishNow(); } catch (Exception e) { if (isRunning()) { LOG.error("Error resizing: "+e, e); } else { if (LOG.isDebugEnabled()) LOG.debug("Error resizing, but no longer running: "+e, e); } } catch (Throwable t) { LOG.error("Error in service-failure-detector: "+t, t); throw Exceptions.propagate(t); } } }; ScheduledTask task = new ScheduledTask(MutableMap.of("delay", Duration.of(delay, TimeUnit.MILLISECONDS)), new BasicTask(job)); ((EntityInternal)entity).getExecutionContext().submit(task); } }

Target:
protected void schedulePublish(long delay) { if (isRunning() && executorQueued.compareAndSet(false, true)) { long now = System.currentTimeMillis(); delay = Math.max(0, Math.max(delay, (executorTime + MIN_PERIOD_BETWEEN_EXECS_MILLIS) - now)); if (LOG.isTraceEnabled()) LOG.trace("{} scheduling publish in {}ms", this, delay); Runnable job = new Runnable() { @Override public void run() { try { executorTime = System.currentTimeMillis(); executorQueued.set(false); publishNow(); } catch (Exception e) { if (isRunning()) { LOG.error("Problem resizing: "+e, e); } else { if (LOG.isDebugEnabled()) LOG.debug("Problem resizing, but no longer running: "+e, e); } } catch (Throwable t) { LOG.error("Problem in service-failure-detector: "+t, t); throw Exceptions.propagate(t); } } }; ScheduledTask task = new ScheduledTask(MutableMap.of("delay", Duration.of(delay, TimeUnit.MILLISECONDS)), new BasicTask(job)); ((EntityInternal)entity).getExecutionContext().submit(task); } }
Source:
protected VDS getEntity(int index) { VDS vds = setUpEntityExpectations(control.createMock(VDS.class), control.createMock(RpmVersion.class), index); VdsStatic vdsStatic = control.createMock(VdsStatic.class); expect(vdsStatic.getId()).andReturn(GUIDS[2]).anyTimes(); expect(vds.getStaticData()).andReturn(vdsStatic).anyTimes(); return vds; }

Target:
protected VDS getEntity(int index) { VDS vds = setUpEntityExpectations(control.createMock(VDS.class), index); VdsStatic vdsStatic = control.createMock(VdsStatic.class); expect(vdsStatic.getId()).andReturn(GUIDS[2]).anyTimes(); expect(vds.getStaticData()).andReturn(vdsStatic).anyTimes(); return vds; }
Source:
public MessageChannel getOutputChannel() { if (this.handler instanceof MessageProducer) { return ((MessageProducer) this.handler).getOutputChannel(); } else if (this.handler instanceof AbstractMessageRouter) { return ((AbstractMessageRouter) this.handler).getDefaultOutputChannel(); } else { return null; } }

Target:
public MessageChannel getOutputChannel() { if (this.handler instanceof MessageProducer) { return ((MessageProducer) this.handler).getOutputChannel(); } else if (this.handler instanceof MessageRouter) { return ((MessageRouter) this.handler).getDefaultOutputChannel(); } else { return null; } }
Source:
private MediaLayout createHelpLayout() { TextView text = new TextView(getContext()); String markdownText = mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_MARKDOWN); if (markdownText != null) { text.setText(forceMarkdown(markdownText)); text.setMovementMethod(LinkMovementMethod.getInstance()); } else { try { text.setText(mPrompt.getHelpText()); } catch (XPathException exception) { UserfacingErrorHandling.createErrorDialog((CommCareActivity)getContext(), exception.getLocalizedMessage(), true); } catch (Exception e) { Logger.exception(TAG + ".createHelpLayout", e); e.printStackTrace(); } } text.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mQuestionFontSize); int padding = (int)getResources().getDimension(R.dimen.help_text_padding); text.setPadding(0, 0, 0, 7); text.setId(38475483); MediaLayout helpLayout = MediaLayout.buildAudioImageVisualLayout(getContext(), text, mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_AUDIO), mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_IMAGE), mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_VIDEO), null); helpLayout.setPadding(padding, padding, padding, padding); return helpLayout; }

Target:
private MediaLayout createHelpLayout() { TextView text = new TextView(getContext()); String markdownText = mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_MARKDOWN); if (markdownText != null) { text.setText(forceMarkdown(markdownText)); text.setMovementMethod(LinkMovementMethod.getInstance()); } else { try { text.setText(mPrompt.getHelpText()); } catch (XPathException exception) { UserfacingErrorHandling.createErrorDialog((CommCareActivity)getContext(), exception.getLocalizedMessage(), true); } } text.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mQuestionFontSize); int padding = (int)getResources().getDimension(R.dimen.help_text_padding); text.setPadding(0, 0, 0, 7); text.setId(38475483); MediaLayout helpLayout = MediaLayout.buildAudioImageVisualLayout(getContext(), text, mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_AUDIO), mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_IMAGE), mPrompt.getHelpMultimedia(FormEntryCaption.TEXT_FORM_VIDEO), null); helpLayout.setPadding(padding, padding, padding, padding); return helpLayout; }
Source:
public Context getContext(String context_type) { GstContextPtr gstContextPtr = GSTELEMENT_API.gst_element_get_context(this, context_type); return gstContextPtr != null ? new Context(Natives.initializer(gstContextPtr.getPointer())) : null; }

Target:
public Context getContext(String context_type) { GstContextPtr gstContextPtr = GSTELEMENT_API.gst_element_get_context(this, context_type); return gstContextPtr != null ? Natives.callerOwnsReturn(gstContextPtr, Context.class) : null; }
Source:
protected Collection<MessageChannel> determineTargetChannels(Message<?> message) { List<MessageChannel> channels = new ArrayList<MessageChannel>(); ConcurrentLinkedQueue<Recipient> recipientList = this.recipients; for (Recipient recipient : recipientList) { if (recipient.accept(message)) { channels.add(recipient.getChannel()); } } return channels; }

Target:
protected Collection<MessageChannel> determineTargetChannels(Message<?> message) { List<MessageChannel> channels = new ArrayList<MessageChannel>(); for (Recipient recipient : this.recipients) { if (recipient.accept(message)) { channels.add(recipient.getChannel()); } } return channels; }
Source:
private static String getVersion() { final String defaultVersion = "dev-" + System.currentTimeMillis(); final String fileName = "bigtable-version.properties"; final String versionProperty = "bigtable.version"; try (InputStream stream = BigtableVersionInfo.class.getResourceAsStream(fileName)) { if (stream == null) { LOG.error("Could not load properties file bigtable-version.properties"); return defaultVersion; } Properties properties = new Properties(); properties.load(stream); String value = properties.getProperty(versionProperty); if (value == null) { LOG.error("$1 not found in $2.", versionProperty, fileName); } else if (value.startsWith("$")){ LOG.info("$1 property is not replaced.", versionProperty); } else { return value; } } catch (IOException e) { LOG.error("Error while trying to get user agent name from $1", e, fileName); } return defaultVersion; }

Target:
private static String getVersion() { final String defaultVersion = "dev-" + System.currentTimeMillis(); final String fileName = "bigtable-version.properties"; final String versionProperty = "bigtable.version"; try (InputStream stream = BigtableVersionInfo.class.getResourceAsStream(fileName)) { if (stream == null) { LOG.error("Could not load properties file bigtable-version.properties"); return defaultVersion; } Properties properties = new Properties(); properties.load(stream); String value = properties.getProperty(versionProperty); if (value == null) { LOG.error("%s not found in %s.", versionProperty, fileName); } else if (value.startsWith("$")){ LOG.info("%s property is not replaced.", versionProperty); } else { return value; } } catch (IOException e) { LOG.error("Error while trying to get user agent name from %s", e, fileName); } return defaultVersion; }
Source:
public void run() { BufferedReader reader = new BufferedReader(new InputStreamReader(fInputStream)); try { String line; while ((line = reader.readLine()) != null) { if (line.length() != 0) { GdbDebugOptions.trace(line); final String finalLine = line; if (getMITracingStream() != null) { try { String message = GdbPlugin.getDebugTime() + " " + finalLine + "\n"; while (message.length() > 100) { String partial = message.substring(0, 100) + "\\\n"; message = message.substring(100); getMITracingStream().write(partial.getBytes()); } getMITracingStream().write(message.getBytes()); } catch (IOException e) { setMITracingStream(null); } } processMIOutput(line); } } } catch (IOException e) { } catch (RejectedExecutionException e) { } try { fInputStream.close(); } catch (IOException e) { } }

Target:
public void run() { BufferedReader reader = new BufferedReader(new InputStreamReader(fInputStream)); try { String line; while ((line = reader.readLine()) != null) { if (line.length() != 0) { if(GdbDebugOptions.DEBUG) { GdbDebugOptions.trace(String.format( "%s %s %s", GdbPlugin.getDebugTime(), MI_TRACE_IDENTIFIER, line)); } final String finalLine = line; if (getMITracingStream() != null) { try { String message = GdbPlugin.getDebugTime() + " " + finalLine + "\n"; while (message.length() > 100) { String partial = message.substring(0, 100) + "\\\n"; message = message.substring(100); getMITracingStream().write(partial.getBytes()); } getMITracingStream().write(message.getBytes()); } catch (IOException e) { setMITracingStream(null); } } processMIOutput(line); } } } catch (IOException e) { } catch (RejectedExecutionException e) { } try { fInputStream.close(); } catch (IOException e) { } }
Source:
public PageFilePageSource( FSDataInputStream inputStream, long start, long splitLength, long fileSize, PagesSerde pagesSerde, List<HiveColumnHandle> columns) throws IOException { this.inputStream = requireNonNull(inputStream, "inputStream is null"); PageFileFooterReader pageFileFooterReader = new PageFileFooterReader(inputStream, fileSize); long[] readStartAndLength = getReadStartAndLength( start, splitLength, pageFileFooterReader.getStripeOffsets()); pageReader = new PageFilePageReader( readStartAndLength[0], readStartAndLength[1], inputStream, pagesSerde); int size = requireNonNull(columns, "columns is null").size(); this.hiveColumnIndexes = new int[size]; for (int columnIndex = 0; columnIndex < size; columnIndex++) { HiveColumnHandle column = columns.get(columnIndex); hiveColumnIndexes[columnIndex] = column.getHiveColumnIndex(); } }

Target:
public PageFilePageSource( FSDataInputStream inputStream, long start, long splitLength, long fileSize, PagesSerde pagesSerde, List<HiveColumnHandle> columns) throws IOException { this.inputStream = requireNonNull(inputStream, "inputStream is null"); PageFileFooterReader pageFileFooterReader = new PageFileFooterReader(inputStream, fileSize); OffsetAndLength readStartAndLength = getReadStartAndLength( start, splitLength, pageFileFooterReader.getFooterOffset(), pageFileFooterReader.getStripeOffsets()); pageReader = new PageFilePageReader( readStartAndLength.getOffset(), readStartAndLength.getLength(), inputStream, pagesSerde); int size = requireNonNull(columns, "columns is null").size(); this.hiveColumnIndexes = new int[size]; for (int columnIndex = 0; columnIndex < size; columnIndex++) { HiveColumnHandle column = columns.get(columnIndex); hiveColumnIndexes[columnIndex] = column.getHiveColumnIndex(); } }
Source:
public void testSoftDeleteFeedbackSession() throws Exception { FeedbackSessionAttributes fs = getNewFeedbackSession(); fsDb.createEntity(fs); ______TS("Success: soft delete an existing feedback session"); fsDb.softDeleteFeedbackSession(fs.getFeedbackSessionName(), fs.getCourseId()); FeedbackSessionAttributes deleted = fsDb.getFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName()); assertNull(deleted); ______TS("Success: restore soft deleted course"); fsDb.restoreDeletedFeedbackSession(fs.getFeedbackSessionName(), fs.getCourseId()); FeedbackSessionAttributes restored = fsDb.getFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName()); assertFalse(restored.isSessionDeleted()); ______TS("null parameter"); AssertionError ae = assertThrows(AssertionError.class, () -> fsDb.softDeleteFeedbackSession(null, null)); assertEquals(Const.StatusCodes.DBLEVEL_NULL_INPUT, ae.getMessage()); }

Target:
public void testSoftDeleteFeedbackSession() throws Exception { FeedbackSessionAttributes fs = getNewFeedbackSession(); fsDb.createEntity(fs); ______TS("Success: soft delete an existing feedback session"); fsDb.softDeleteFeedbackSession(fs.getFeedbackSessionName(), fs.getCourseId()); assertNull(fsDb.getFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName())); assertNotNull(fsDb.getSoftDeletedFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName())); ______TS("Success: restore soft deleted course"); fsDb.restoreDeletedFeedbackSession(fs.getFeedbackSessionName(), fs.getCourseId()); assertNull(fsDb.getSoftDeletedFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName())); assertNotNull(fsDb.getFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName())); assertFalse(fsDb.getFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName()).isSessionDeleted()); ______TS("null parameter"); AssertionError ae = assertThrows(AssertionError.class, () -> fsDb.softDeleteFeedbackSession(null, null)); assertEquals(Const.StatusCodes.DBLEVEL_NULL_INPUT, ae.getMessage()); }
Source:
public void createFileTypes(@NotNull FileTypeConsumer consumer) { consumer.consume(ProguardFileType.INSTANCE, "pro"); }

Target:
public void createFileTypes(@NotNull FileTypeConsumer consumer) { consumer.consume(ProguardFileType.INSTANCE, ProguardFileType.EXT_PRO); }
Source:
public Option[] config() { String basedir = System.getProperty("basedir"); if (basedir == null) { basedir = Paths.get(".").toString(); } return new Option[] { carbonDistribution( Paths.get(basedir, "..", "test-distribution", "target", "wso2carbon-kernel-test-5.2.0-SNAPSHOT.zip")) }; }

Target:
public Option[] config() { String basedir = System.getProperty("basedir"); if (basedir == null) { basedir = Paths.get(".").toString(); } return new Option[] { carbonDistribution( Paths.get(basedir, "..", "test-distribution", "target", "wso2carbon-kernel-test-" + System.getProperty("carbon.kernel.version") + ".zip")) }; }
Source:
private boolean saveAllExecutions() { return Boolean.getBoolean("RECORDER_SAVE_ALL"); }

Target:
private boolean saveAllExecutions() { return ALWAYS.equals(RECORDER_OPTION); }
Source:
public Response updateContentTypeFieldById(@PathParam("typeId") final String typeId, @PathParam("fieldId") final String fieldId, final String fieldJson, @Context final HttpServletRequest req) throws DotDataException, DotSecurityException { final InitDataObject initData = this.webResource.init(null, false, req, false, null); final User user = initData.getUser(); Response response = null; try { Field field = new JsonFieldTransformer(fieldJson).from(); if (!UtilMethods.isSet(field.id())) { response = ExceptionMapperUtil.createResponse(null, "Field 'id' should be set"); } else { final Field currentField = fieldAPI.find(fieldId); if (!currentField.id().equals(field.id())) { throw new DotDataValidationException("Field id '"+ fieldId +"' does not match a field with id '"+ field.id() +"'"); } else if(!currentField.variable().equals(field.variable())){ throw new DotDataValidationException("Field variable can not be modified, please use the following: " + currentField.variable()); } else { field = fieldAPI.save(field, user); response = Response.ok(new ResponseEntityView(new JsonFieldTransformer(field).mapObject())).build(); } } } catch (Exception e) { response = ResponseUtil.mapExceptionResponse(e); } return response; }

Target:
public Response updateContentTypeFieldById(@PathParam("typeId") final String typeId, @PathParam("fieldId") final String fieldId, final String fieldJson, @Context final HttpServletRequest req) throws DotDataException, DotSecurityException { final InitDataObject initData = this.webResource.init(null, false, req, false, null); final User user = initData.getUser(); Response response = null; try { Field field = new JsonFieldTransformer(fieldJson).from(); if (!UtilMethods.isSet(field.id())) { response = ExceptionMapperUtil.createResponse(null, "Field 'id' should be set"); } else { final Field currentField = fieldAPI.find(fieldId); if (!currentField.id().equals(field.id())) { throw new DotDataValidationException("Field id '"+ field.id() +"' does not match a field with id '"+ currentField.id() +"'"); } else { field = fieldAPI.save(field, user); response = Response.ok(new ResponseEntityView(new JsonFieldTransformer(field).mapObject())).build(); } } } catch (Exception e) { response = ResponseUtil.mapExceptionResponse(e); } return response; }
Source:
public WorkspaceConfigImpl devFileToWorkspaceConfig( Devfile devfile, FileContentProvider contentProvider) throws DevfileException { checkArgument(devfile != null, "Devfile must not be null"); checkArgument(contentProvider != null, "Content provider must not be null"); validateCurrentVersion(devfile); WorkspaceConfigImpl config = new WorkspaceConfigImpl(); config.setName(devfile.getName()); for (Command command : devfile.getCommands()) { config.getCommands().add(commandConverter.toWorkspaceCommand(command)); } for (Component component : devfile.getComponents()) { ComponentToWorkspaceApplier applier = componentTypeToApplier.get(component.getType()); if (applier == null) { throw new DevfileException( String.format( "Devfile contains component `%s` with type `%s` that can not be converted to workspace", component.getName(), component.getType())); } applier.apply(config, component, contentProvider); } for (Project project : devfile.getProjects()) { ProjectConfigImpl projectConfig = projectConverter.toWorkspaceProject(project); config.getProjects().add(projectConfig); } return config; }

Target:
public WorkspaceConfigImpl devFileToWorkspaceConfig( Devfile devfile, FileContentProvider contentProvider) throws DevfileException { checkArgument(devfile != null, "Devfile must not be null"); checkArgument(contentProvider != null, "Content provider must not be null"); validateCurrentVersion(devfile); defaultEditorProvisioner.apply(devfile); WorkspaceConfigImpl config = new WorkspaceConfigImpl(); config.setName(devfile.getName()); for (Command command : devfile.getCommands()) { config.getCommands().add(commandConverter.toWorkspaceCommand(command)); } for (Component component : devfile.getComponents()) { ComponentToWorkspaceApplier applier = componentTypeToApplier.get(component.getType()); if (applier == null) { throw new DevfileException( String.format( "Devfile contains component `%s` with type `%s` that can not be converted to workspace", component.getName(), component.getType())); } applier.apply(config, component, contentProvider); } for (Project project : devfile.getProjects()) { ProjectConfigImpl projectConfig = projectConverter.toWorkspaceProject(project); config.getProjects().add(projectConfig); } return config; }
Source:
public void launch(ISelection selection, String mode) { if (selection instanceof IStructuredSelection) { Object element = ((IStructuredSelection) selection).getFirstElement(); if (element != null && element instanceof IResource) { try { IResource selectedResource = (IResource) element; launchBower(selectedResource); } catch (CoreException e) { Activator.logError(e); } } } }

Target:
public void launch(ISelection selection, String mode) { if (selection instanceof IStructuredSelection) { Object element = ((IStructuredSelection) selection).getFirstElement(); if (element instanceof IResource) { try { IResource selectedResource = (IResource) element; launchBower(selectedResource); } catch (CoreException e) { Activator.logError(e); } } } }
Source:
static Iterator<Double> rangeBy(BigDecimal from, BigDecimal toExclusive, BigDecimal step) { if (areEqual(step, BigDecimal.ZERO)) { throw new IllegalArgumentException("step cannot be 0"); } else if (areEqual(from, toExclusive) || step.signum() == from.subtract(toExclusive).signum()) { return empty(); } else { if (step.compareTo(BigDecimal.ZERO) > 0) { return new AbstractIterator<Double>() { BigDecimal i = from; @Override public boolean hasNext() { return i.compareTo(toExclusive) < 0; } @Override public Double getNext() { final BigDecimal next = this.i; this.i = next.add(step); return next.doubleValue(); } }; } else { return new AbstractIterator<Double>() { BigDecimal i = from; @Override public boolean hasNext() { return i.compareTo(toExclusive) > 0; } @Override public Double getNext() { final BigDecimal next = this.i; this.i = next.add(step); return next.doubleValue(); } }; } } }

Target:
static Iterator<BigDecimal> rangeBy(BigDecimal from, BigDecimal toExclusive, BigDecimal step) { if (step.signum() == 0) { throw new IllegalArgumentException("step cannot be 0"); } else if (areEqual(from, toExclusive) || step.signum() == from.subtract(toExclusive).signum()) { return empty(); } else { if (step.signum() > 0) { return new AbstractIterator<BigDecimal>() { BigDecimal i = from; @Override public boolean hasNext() { return i.compareTo(toExclusive) < 0; } @Override public BigDecimal getNext() { final BigDecimal next = this.i; this.i = next.add(step); return next; } }; } else { return new AbstractIterator<BigDecimal>() { BigDecimal i = from; @Override public boolean hasNext() { return i.compareTo(toExclusive) > 0; } @Override public BigDecimal getNext() { final BigDecimal next = this.i; this.i = next.add(step); return next; } }; } } }
Source:
private String fieldAbstractJavaType(FieldSpec field) { if (field.type() instanceof FieldType.BoolFieldType) { return "boolean"; } else if (field.type() instanceof FieldType.Int8FieldType) { return "byte"; } else if (field.type() instanceof FieldType.Int16FieldType) { return "short"; } else if (field.type() instanceof FieldType.Int32FieldType) { return "int"; } else if (field.type() instanceof FieldType.Int64FieldType) { return "long"; } else if (field.type() instanceof FieldType.UUIDFieldType) { return "UUID"; } else if (field.type().isString()) { return "String"; } else if (field.type().isBytes() && field.useByteBuffer()) { headerGenerator.addImport(MessageGenerator.BYTE_BUFFER_CLASS); return "ByteBuffer"; } else if (field.type().isBytes() && !field.useByteBuffer()) { return "byte[]"; } else if (field.type().isStruct()) { return MessageGenerator.capitalizeFirst(field.typeString()); } else if (field.type().isArray()) { FieldType.ArrayType arrayType = (FieldType.ArrayType) field.type(); if (structRegistry.isStructArrayWithKeys(field)) { headerGenerator.addImport(MessageGenerator.IMPLICIT_LINKED_HASH_MULTI_COLLECTION_CLASS); return collectionType(arrayType.elementType().toString()); } else { headerGenerator.addImport(MessageGenerator.LIST_CLASS); return "List<" + getBoxedJavaType(arrayType.elementType()) + ">"; } } else { throw new RuntimeException("Unknown field type " + field.type()); } }

Target:
private String fieldAbstractJavaType(FieldSpec field) { if (field.type() instanceof FieldType.BoolFieldType) { return "boolean"; } else if (field.type() instanceof FieldType.Int8FieldType) { return "byte"; } else if (field.type() instanceof FieldType.Int16FieldType) { return "short"; } else if (field.type() instanceof FieldType.Int32FieldType) { return "int"; } else if (field.type() instanceof FieldType.Int64FieldType) { return "long"; } else if (field.type() instanceof FieldType.UUIDFieldType) { headerGenerator.addImport(MessageGenerator.UUID_CLASS); return "UUID"; } else if (field.type().isString()) { return "String"; } else if (field.type().isBytes()) { if (field.zeroCopy()) { headerGenerator.addImport(MessageGenerator.BYTE_BUFFER_CLASS); return "ByteBuffer"; } else { return "byte[]"; } } else if (field.type().isStruct()) { return MessageGenerator.capitalizeFirst(field.typeString()); } else if (field.type().isArray()) { FieldType.ArrayType arrayType = (FieldType.ArrayType) field.type(); if (structRegistry.isStructArrayWithKeys(field)) { headerGenerator.addImport(MessageGenerator.IMPLICIT_LINKED_HASH_MULTI_COLLECTION_CLASS); return collectionType(arrayType.elementType().toString()); } else { headerGenerator.addImport(MessageGenerator.LIST_CLASS); return "List<" + getBoxedJavaType(arrayType.elementType()) + ">"; } } else { throw new RuntimeException("Unknown field type " + field.type()); } }
Source:
public void advertiseId(final AnyObjectId id, final String refName) throws IOException { tmpLine.setLength(0); id.copyTo(tmpId, tmpLine); tmpLine.append(' '); tmpLine.append(refName); if (first) { first = false; if (!capablities.isEmpty()) { tmpLine.append('\0'); for (final String capName : capablities) { tmpLine.append(' '); tmpLine.append(capName); } tmpLine.append(' '); } } tmpLine.append('\n'); writeOne(tmpLine.toString()); }

Target:
public void advertiseId(final AnyObjectId id, final String refName) throws IOException { tmpLine.setLength(0); id.copyTo(tmpId, tmpLine); tmpLine.append(' '); tmpLine.append(refName); if (first) { first = false; if (!capablities.isEmpty()) { tmpLine.append('\0'); for (final String capName : capablities) { tmpLine.append(' '); tmpLine.append(capName); } tmpLine.append(' '); } } tmpLine.append('\n'); writeOne(tmpLine); }
Source:
@Test void testSimplifyAndIsNotNull() { final RexNode aRef = input(tInt(true), 0); final RexNode bRef = input(tInt(true), 1); RexNode expr = and( and(lt(literal(0), aRef), lt(aRef, literal(10))), isNotNull(bRef)); final String simplified = "AND(SEARCH($0, Sarg[(0..10)]), IS NOT NULL($1))"; final String expanded = "AND(AND(>($0, 0), <($0, 10)), IS NOT NULL($1))"; checkSimplify(expr, simplified) .expandedSearch(expanded); }

Target:
@Test void testSimplifyAndIsNotNull() { final RexNode aRef = input(tInt(true), 0); final RexNode bRef = input(tInt(true), 1); RexNode expr = and( and(lt(literal(0), aRef), lt(aRef, literal(10))), isNotNull(bRef)); final String simplified = "AND(SEARCH($0, Sarg[(0..10)]), IS NOT NULL($1))"; final String expanded = "AND(>($0, 0), <($0, 10), IS NOT NULL($1))"; checkSimplify(expr, simplified) .expandedSearch(expanded); }
Source:
private static void refreshBorderFigure(final BorderedStyle borderedStyle, final StyledFigure styledFigure) { LineBorder lineBorder = null; if (styledFigure.getBorder() instanceof LineBorder) { lineBorder = (LineBorder) styledFigure.getBorder(); } else { lineBorder = new LineBorder(); if (styledFigure instanceof Shape) { styledFigure.setBorder(null); } else { styledFigure.setBorder(lineBorder); } } int borderSize = 0; if (borderedStyle.getBorderSize() != null) { borderSize = borderedStyle.getBorderSize().intValue(); } lineBorder.setWidth(borderSize); final RGBValues borderColor = borderedStyle.getBorderColor(); if (borderColor != null) { lineBorder.setColor(VisualBindingManager.getDefault().getColorFromRGBValues(borderColor)); } final LineStyle borderLineStyle = borderedStyle.getBorderLineStyle(); if (borderLineStyle != null) { if (styledFigure instanceof SquareFigure) { ((SquareFigure) styledFigure).setLineStyle(borderLineStyle.getValue() + 1); } else if (styledFigure instanceof DotFigure) { ((DotFigure) styledFigure).setLineStyle(borderLineStyle.getValue() + 1); } else if (styledFigure instanceof LozengeFigure) { ((LozengeFigure) styledFigure).setLineStyle(borderLineStyle.getValue() + 1); } else if (styledFigure instanceof ODesignEllipseFigure) { ((ODesignEllipseFigure) styledFigure).setLineStyle(borderLineStyle.getValue() + 1); } else if (styledFigure instanceof Figure) { refreshBorderLineStyle(styledFigure, borderLineStyle); } } if (borderSize == 0) { if (!(styledFigure instanceof NoteFigure)) { styledFigure.setBorder(null); } } }

Target:
private static void refreshBorderFigure(final BorderedStyle borderedStyle, final StyledFigure styledFigure) { LineBorder lineBorder = null; if (styledFigure.getBorder() instanceof LineBorder) { lineBorder = (LineBorder) styledFigure.getBorder(); } else { lineBorder = new LineBorder(); if (styledFigure instanceof Shape) { styledFigure.setBorder(null); } else { styledFigure.setBorder(lineBorder); } } int borderSize = 0; if (borderedStyle.getBorderSize() != null) { borderSize = borderedStyle.getBorderSize().intValue(); } lineBorder.setWidth(borderSize); final RGBValues borderColor = borderedStyle.getBorderColor(); if (borderColor != null) { lineBorder.setColor(VisualBindingManager.getDefault().getColorFromRGBValues(borderColor)); } if (borderSize == 0) { if (!(styledFigure instanceof NoteFigure)) { styledFigure.setBorder(null); } } }
Source:
private RtPeopleExtractor(Element filmElement, Film film, AdapterLog log) { this.filmElement = filmElement; this.film = film; this.log = log; List<Person> people = Lists.newArrayList(); }

Target:
private RtPeopleExtractor(Element filmElement, Film film, AdapterLog log) { this.filmElement = checkNotNull(filmElement); this.film = checkNotNull(film); this.log = checkNotNull(log); List<Person> people = Lists.newArrayList(); }