auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRawQueryWithBlob() throws ErrnoException { for (Network network : getTestableNetworks()) { CountDownLatch latch = new CountDownLatch(1); final int TIMEOUT_MS = 12_000; final byte[] blob = new byte[]{ 0x55, 0x66, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x77, 0x77, 0x77, 0x06, 0x67, 0x6F, 0x6F, 0x67, 0x6c, 0x65, 0x03, 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x01, 0x00, 0x01 }; String msg = "Raw query with blob " + byteArrayToHexString(blob); mDns.query(network, blob, FLAG_NO_CACHE_LOOKUP, mHandler, answer -> { if (answer == null) { fail(msg + " no answer returned"); } try { new CheckedDnsPacket(answer); Log.d(TAG, "Reported blob:" + byteArrayToHexString(answer)); latch.countDown(); } catch (DnsPacket.ParseException e) { Log.d(TAG, e.getMessage()); fail(msg + " no valid answer"); } } ); try { assertTrue(msg + " but no answer after " + TIMEOUT_MS + "ms.", latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); } catch (InterruptedException e) { } } }

Target:
public void testRawQueryWithBlob() throws ErrnoException { final byte[] blob = new byte[]{ 0x55, 0x66, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x77, 0x77, 0x77, 0x06, 0x67, 0x6F, 0x6F, 0x67, 0x6c, 0x65, 0x03, 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x01, 0x00, 0x01 }; final String msg = "Raw query with blob " + byteArrayToHexString(blob); for (Network network : getTestableNetworks()) { final CountDownLatch latch = new CountDownLatch(1); mDns.query(network, blob, FLAG_NO_CACHE_LOOKUP, mHandler, answer -> { if (answer == null) { fail(msg + " no answer returned"); } try { assertValidAnswer(msg, new DnsAnswer(answer)); Log.d(TAG, "Reported blob:" + byteArrayToHexString(answer)); latch.countDown(); } catch (DnsPacket.ParseException e) { fail(msg + e.getMessage()); } } ); try { assertTrue(msg + " but no answer after " + TIMEOUT_MS + "ms.", latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); } catch (InterruptedException e) { } } }
Source:
public Path generateArtifact(URI uri, int size) throws IOException { try { NugetArtifactCoordinates nugetArtCoords = NugetArtifactCoordinates.parse(Paths.get(uri).toString()); generateNugetPackage(nugetArtCoords.getId(), nugetArtCoords.getVersion()); }catch(JAXBException | NoSuchAlgorithmException | NugetFormatException e){ logger.error(e.getMessage(),e); } return Paths.get(uri); }

Target:
public Path generateArtifact(URI uri, int size) throws IOException { NugetArtifactCoordinates coordinates = NugetArtifactCoordinates.parse(uri.toString()); try { generateNugetPackage(coordinates.getId(), coordinates.getVersion()); } catch(JAXBException | NoSuchAlgorithmException | NugetFormatException e) { throw new IOException(e); } return basedir.resolve(coordinates.toPath()).normalize().toAbsolutePath(); }
Source:
public static void checkOnGraph(GraphData graph, RelationNode... nodes) throws OseeCoreException { checkNotNull(graph, "graph"); for (RelationNode node : nodes) { checkNotNull(node, "node"); IOseeBranch branchnode = node.getBranch(); IOseeBranch branchgraph = graph.getBranch(); checkExpressionFailOnTrue(!branchgraph.equals(branchnode), "Error - Node[%s] is on branch[%s] but should be on branch[%s]", node, branchnode, branchgraph); } }

Target:
public static void checkOnGraph(GraphData graph, RelationNode... nodes) throws OseeCoreException { checkNotNull(graph, "graph"); for (RelationNode node : nodes) { checkNotNull(node, "node"); GraphData graph2 = node.getGraph(); checkExpressionFailOnTrue(!graph.equals(graph2), "Error - Node[%s] is on graph[%s] but should be on graph[%s]", node, graph2, graph); } }
Source:
public boolean equals(Object o) { if (o instanceof StartMessageEvent) { StartMessageEvent other = (StartMessageEvent) o; return super.equals(other) && (other.executionSet == null ? executionSet == null : other.executionSet.equals(executionSet)) && (other.dataIOSet == null ? dataIOSet == null : other.dataIOSet.equals(dataIOSet)); } return false; }

Target:
public boolean equals(Object o) { if (o instanceof StartMessageEvent) { StartMessageEvent other = (StartMessageEvent) o; return super.equals(other) && Objects.equals(executionSet, other.executionSet) && Objects.equals(dataIOSet, other.dataIOSet) && Objects.equals(labels, other.labels); } return false; }
Source:
private Collection<DetailedLink> getLinks() { ApplicationMode appMode = getCurrent().get(ApplicationMode.class); if (appMode == ApplicationMode.GlusterOnly) { return getGlusterOnlyLinks(); } Collection<DetailedLink> links = new LinkedList<DetailedLink>(); links.add(createLink("capabilities")); links.add(createLink("clusters", LinkFlags.SEARCHABLE)); links.add(createLink("datacenters", LinkFlags.SEARCHABLE)); links.add(createLink("events", LinkFlags.SEARCHABLE, getEventParams())); links.add(createLink("hosts", LinkFlags.SEARCHABLE)); links.add(createLink("networks")); links.add(createLink("roles")); links.add(createLink("storagedomains", LinkFlags.SEARCHABLE)); links.add(createLink("tags")); links.add(createLink("templates", LinkFlags.SEARCHABLE)); links.add(createLink("users", LinkFlags.SEARCHABLE)); links.add(createLink("groups", LinkFlags.SEARCHABLE)); links.add(createLink("domains")); links.add(createLink("vmpools", LinkFlags.SEARCHABLE)); links.add(createLink("vms", LinkFlags.SEARCHABLE)); links.add(createLink("disks", LinkFlags.SEARCHABLE)); return links; }

Target:
private Collection<DetailedLink> getLinks() { Collection<DetailedLink> links = new LinkedList<DetailedLink>(); links.add(createLink("capabilities")); links.add(createLink("clusters", LinkFlags.SEARCHABLE)); links.add(createLink("datacenters", LinkFlags.SEARCHABLE)); links.add(createLink("events", LinkFlags.SEARCHABLE, getEventParams())); links.add(createLink("hosts", LinkFlags.SEARCHABLE)); links.add(createLink("networks")); links.add(createLink("roles")); links.add(createLink("storagedomains", LinkFlags.SEARCHABLE)); links.add(createLink("tags")); links.add(createLink("templates", LinkFlags.SEARCHABLE)); links.add(createLink("users", LinkFlags.SEARCHABLE)); links.add(createLink("groups", LinkFlags.SEARCHABLE)); links.add(createLink("domains")); links.add(createLink("vmpools", LinkFlags.SEARCHABLE)); links.add(createLink("vms", LinkFlags.SEARCHABLE)); links.add(createLink("disks", LinkFlags.SEARCHABLE)); return links; }
Source:
private Map<String, Object> toMap(ServerConfiguration conf) { Map<String, Object> configMap = new HashMap<>(); Iterator iterator = conf.getKeys(); while (iterator.hasNext()) { String key = iterator.next().toString(); List values = conf.getList(key); if (values.size() > 0) { configMap.put(key, values.get(0)); } } return configMap; }

Target:
private Map<String, Object> toMap(ServerConfiguration conf) { Map<String, Object> configMap = new HashMap<>(); Iterator iterator = conf.getKeys(); while (iterator.hasNext()) { String key = iterator.next().toString(); Object property = conf.getProperty(key); if (property != null) { configMap.put(key, property.toString()); } } return configMap; }
Source:
protected void build(UnitVmModel model, T vm) { vm.setMemSizeMb(model.getMemSize().getEntity()); if (model.getIoThreadsEnabled().getEntity()) { vm.setNumOfIoThreads(model.getNumOfIoThreads().getEntity()); } else { vm.setNumOfIoThreads(0); } vm.setNumOfSockets(model.getNumOfSockets().getSelectedItem()); vm.setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity()) / model.getNumOfSockets().getSelectedItem()); vm.setDefaultDisplayType(model.getDisplayType().getSelectedItem()); vm.setNumOfMonitors(model.getNumOfMonitors().getSelectedItem()); vm.setSmartcardEnabled(model.getIsSmartcardEnabled().getEntity()); vm.setSsoMethod(model.extractSelectedSsoMethod()); vm.setMinAllocatedMem(model.getMinAllocatedMemory().getEntity()); vm.setDefaultBootSequence(model.getBootSequence()); vm.setSingleQxlPci(model.getIsSingleQxlEnabled().getEntity()); vm.setCustomEmulatedMachine(model.getEmulatedMachine().getSelectedItem()); vm.setCustomCpuName(model.getCustomCpu().getSelectedItem()); vm.setCompatibilityVersion(model.getCompatibilityVersion().getSelectedItem()); }

Target:
protected void build(UnitVmModel model, T vm) { vm.setMemSizeMb(model.getMemSize().getEntity()); if (model.getIoThreadsEnabled().getEntity()) { vm.setNumOfIoThreads(model.getNumOfIoThreads().getEntity()); } else { vm.setNumOfIoThreads(0); } vm.setNumOfSockets(model.getNumOfSockets().getSelectedItem()); vm.setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity()) / model.getNumOfSockets().getSelectedItem()); vm.setDefaultDisplayType(model.getDisplayType().getSelectedItem()); vm.setNumOfMonitors(model.getNumOfMonitors().getSelectedItem()); vm.setSmartcardEnabled(model.getIsSmartcardEnabled().getEntity()); vm.setSsoMethod(model.extractSelectedSsoMethod()); vm.setMinAllocatedMem(model.getMinAllocatedMemory().getEntity()); vm.setDefaultBootSequence(model.getBootSequence()); vm.setSingleQxlPci(model.getIsSingleQxlEnabled().getEntity()); vm.setCustomEmulatedMachine(model.getEmulatedMachine().getSelectedItem()); vm.setCustomCpuName(model.getCustomCpu().getSelectedItem()); }
Source:
public void createDirectory(CreateDirectoryPRequest request, StreamObserver<CreateDirectoryPResponse> responseObserver) { CreateDirectoryPOptions options = request.getOptions(); RpcUtils.call(LOG, () -> { AlluxioURI pathUri = getAlluxioURI(request.getPath()); mFileSystemMaster.createDirectory(pathUri, (CreateDirectoryContext) CreateDirectoryContext .create(options.toBuilder()).withTracker(new GrpcCallTracker(responseObserver))); return CreateDirectoryPResponse.newBuilder().build(); }, "CreateDirectory", "request=%s", responseObserver, request); }

Target:
public void createDirectory(CreateDirectoryPRequest request, StreamObserver<CreateDirectoryPResponse> responseObserver) { CreateDirectoryPOptions options = request.getOptions(); RpcUtils.call(LOG, () -> { AlluxioURI pathUri = getAlluxioURI(request.getPath()); mFileSystemMaster.createDirectory(pathUri, CreateDirectoryContext.create(options.toBuilder()) .withTracker(new GrpcCallTracker(responseObserver))); return CreateDirectoryPResponse.newBuilder().build(); }, "CreateDirectory", "request=%s", responseObserver, request); }
Source:
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement function = descriptor.getStartElement().getParent(); GoSignature signature = (function != null && function instanceof GoFunctionDeclaration) ? ((GoFunctionDeclaration)function).getSignature() : null; if (signature == null) return; PsiFile file = signature.getContainingFile(); if (!(file instanceof GoFile)) return; if (myType == GoTestFunctionType.EXAMPLE) { signature.replace(GoElementFactory.createFunctionSignatureFromText(project, "")); return; } GoImportSpec testingImportSpec = (((GoFile)file).getImportedPackagesMap().get(GoConstants.TESTING_PATH)); if (testingImportSpec == null) { ((GoFile)file).addImport(GoConstants.TESTING_PATH, null); } String paramType = getProperParamType(getTestingAlias(testingImportSpec), myType); signature.replace(GoElementFactory.createFunctionSignatureFromText(project, myType.getParamType().toLowerCase() + " " + paramType)); }

Target:
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement function = descriptor.getStartElement().getParent(); GoSignature signature = (function != null && function instanceof GoFunctionDeclaration) ? ((GoFunctionDeclaration)function).getSignature() : null; if (signature == null) return; PsiFile file = signature.getContainingFile(); if (!(file instanceof GoFile)) return; if (myType == GoTestFunctionType.EXAMPLE) { signature.replace(GoElementFactory.createFunctionSignatureFromText(project, "")); return; } GoImportSpec testingImportSpec = (((GoFile)file).getImportedPackagesMap().get(GoConstants.TESTING_PATH)); if (testingImportSpec == null) { ((GoFile)file).addImport(GoConstants.TESTING_PATH, null); } String paramType = getProperParamType(getTestingAlias(testingImportSpec), myType); signature .replace(GoElementFactory.createFunctionSignatureFromText(project, myType.getParamType().toLowerCase(Locale.US) + " " + paramType)); }
Source:
public boolean validate(IOperationMonitor monitor) throws BugzillaRestException { RepositoryLocation location = getClient().getLocation(); if (Boolean.parseBoolean(location.getProperty(IBugzillaRestConstants.REPOSITORY_USE_API_KEY))) { UserCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); if (credentials == null) { throw new IllegalStateException("Authentication requested without valid credentials"); } String url = MessageFormat.format("/valid_login?login={0}&api_key={1}", new Object[] { credentials.getUserName(), location.getProperty(IBugzillaRestConstants.REPOSITORY_API_KEY) }); BooleanResult response = new BugzillaRestUnauthenticatedGetRequest<BooleanResult>(client, url, new TypeToken<BooleanResult>() { }).run(monitor); return response.getResult(); } else { LoginToken validateResponse = new BugzillaRestLoginRequest(client).run(monitor); if (validateResponse != null && !Strings.isNullOrEmpty(validateResponse.getId())) { String url = MessageFormat.format("/logout?token={0}", new Object[] { validateResponse.getToken() }); new BugzillaRestUnauthenticatedGetRequest<BooleanResult>(client, url, new TypeToken<BooleanResult>() { }).run(monitor); return true; } } return false; }

Target:
public boolean validate(IOperationMonitor monitor) throws BugzillaRestException { RepositoryLocation location = getClient().getLocation(); if (location.getBooleanPropery(IBugzillaRestConstants.REPOSITORY_USE_API_KEY)) { UserCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); if (credentials == null) { throw new IllegalStateException("Authentication requested without valid credentials"); } String url = MessageFormat.format("/valid_login?login={0}&api_key={1}", new Object[] { credentials.getUserName(), location.getProperty(IBugzillaRestConstants.REPOSITORY_API_KEY) }); BooleanResult response = new BugzillaRestUnauthenticatedGetRequest<BooleanResult>(client, url, new TypeToken<BooleanResult>() { }).run(monitor); return response.getResult(); } else { LoginToken validateResponse = new BugzillaRestLoginRequest(client).run(monitor); if (validateResponse != null && !Strings.isNullOrEmpty(validateResponse.getId())) { String url = MessageFormat.format("/logout?token={0}", new Object[] { validateResponse.getToken() }); new BugzillaRestUnauthenticatedGetRequest<BooleanResult>(client, url, new TypeToken<BooleanResult>() { }).run(monitor); return true; } } return false; }
Source:
public void setParameterExpressions(Map<String, String> parameterExpressions) { Map<String, Expression[]> paramExpressions = new HashMap<String, Expression[]>(parameterExpressions.size()); for (String paramName : parameterExpressions.keySet()) { String expression = parameterExpressions.get(paramName); Expression[] expressions = new Expression[] { PARSER.parseExpression(expression), PARSER.parseExpression("#root.![" + expression + "]") }; paramExpressions.put(paramName, expressions); } this.parameterExpressions = paramExpressions; }

Target:
public void setParameterExpressions(Map<String, String> parameterExpressions) { Map<String, Expression[]> paramExpressions = new HashMap<String, Expression[]>(parameterExpressions.size()); for (Map.Entry<String, String> entry : parameterExpressions.entrySet()) { String key = entry.getKey(); String expression = entry.getValue(); Expression[] expressions = new Expression[] { PARSER.parseExpression(expression), PARSER.parseExpression("#root.![" + expression + "]") }; paramExpressions.put(key, expressions); } this.parameterExpressions = paramExpressions; }
Source:
public static void show(AppCompatActivity activity, Integer containerViewId, ObaStop stop, Callback callback) { FragmentManager fm = activity.getSupportFragmentManager(); SimpleArrivalListFragment fragment = new SimpleArrivalListFragment(); fragment.setObaStop(stop); Intent intent = new Intent(activity, SimpleArrivalListFragment.class); intent.setData(Uri.withAppendedPath(ObaContract.Stops.CONTENT_URI, stop.getId())); fragment.setArguments(FragmentUtils.getIntentArgs(intent)); fragment.setCallback(callback); try { FragmentTransaction ft = fm.beginTransaction(); ft.replace(containerViewId, fragment, TAG); ft.addToBackStack(null); ft.commit(); } catch (IllegalStateException e) { Log.v("ArrivalListFragment", "Cannot show SimpleArrivalListFragment"); } }

Target:
public static void show(AppCompatActivity activity, Integer containerViewId, ObaStop stop, Callback callback) { FragmentManager fm = activity.getSupportFragmentManager(); SimpleArrivalListFragment fragment = new SimpleArrivalListFragment(); fragment.setObaStop(stop); Intent intent = new Intent(activity, SimpleArrivalListFragment.class); intent.setData(Uri.withAppendedPath(ObaContract.Stops.CONTENT_URI, stop.getId())); fragment.setArguments(FragmentUtils.getIntentArgs(intent)); fragment.setCallback(callback); try { FragmentTransaction ft = fm.beginTransaction(); ft.replace(containerViewId, fragment, TAG); ft.addToBackStack(null); ft.commit(); } catch (IllegalStateException e) { Log.e(TAG, "Cannot show SimpleArrivalListFragment after onSaveInstanceState has been called"); } }
Source:
private ServiceBusAsyncConsumer getOrCreateConsumer(String linkName) { return openConsumers.computeIfAbsent(linkName, name -> { logger.info("{}: Creating consumer for link '{}'", entityPath, linkName); final Flux<AmqpReceiveLink> receiveLinkMono = connectionProcessor.flatMap(connection -> connection.createReceiveLink(linkName, entityPath, receiveMode, isSessionEnabled, null, entityType)) .doOnNext(next -> { final String format = "Created consumer for Service Bus resource: mode: [{}]" + " sessionEnabled? transferEntityPath: [{}], entityType: [{}]"; logger.verbose(format, next.getEntityPath(), receiveMode, isSessionEnabled, "N/A", entityType); }) .repeat(); final AmqpRetryPolicy retryPolicy = RetryUtil.getRetryPolicy(connectionProcessor.getRetryOptions()); final ServiceBusReceiveLinkProcessor linkMessageProcessor = receiveLinkMono.subscribeWith( new ServiceBusReceiveLinkProcessor(prefetch, retryPolicy, connectionProcessor)); return new ServiceBusAsyncConsumer(linkMessageProcessor, messageSerializer, isAutoComplete, this::complete); }); }

Target:
private ServiceBusAsyncConsumer getOrCreateConsumer(String linkName) { return openConsumers.computeIfAbsent(linkName, name -> { logger.info("{}: Creating consumer for link '{}'", entityPath, linkName); final Flux<AmqpReceiveLink> receiveLink = connectionProcessor.flatMap(connection -> connection.createReceiveLink(linkName, entityPath, receiveMode, isSessionEnabled, null, entityType)) .doOnNext(next -> { final String format = "Created consumer for Service Bus resource: mode: [{}]" + " sessionEnabled? transferEntityPath: [{}], entityType: [{}]"; logger.verbose(format, next.getEntityPath(), receiveMode, isSessionEnabled, "N/A", entityType); }) .repeat(); final AmqpRetryPolicy retryPolicy = RetryUtil.getRetryPolicy(connectionProcessor.getRetryOptions()); final ServiceBusReceiveLinkProcessor linkMessageProcessor = receiveLink.subscribeWith( new ServiceBusReceiveLinkProcessor(prefetch, retryPolicy, connectionProcessor)); return new ServiceBusAsyncConsumer(linkMessageProcessor, messageSerializer, isAutoComplete, this::complete, this::abandon); }); }
Source:
private static Row getRowFromVersionedValue(MVTable table, long recKey, VersionedValue versionedValue) { Object value = versionedValue == null ? null : versionedValue.value; Row result = null; if (value != null) { Row result11; if(value instanceof Row) { result11 = (Row) value; assert result11.getKey() == recKey : result11.getKey() + " != " + recKey; } else { ValueArray array = (ValueArray) value; result11 = table.createRow(array.getList(), 0); result11.setKey(recKey); } result = result11; } return result; }

Target:
private static Row getRowFromVersionedValue(MVTable table, long recKey, VersionedValue versionedValue) { Object value = versionedValue == null ? null : versionedValue.value; if (value == null) { return null; } Row result; if(value instanceof Row) { result = (Row) value; assert result.getKey() == recKey : result.getKey() + " != " + recKey; } else { ValueArray array = (ValueArray) value; result = table.createRow(array.getList(), 0); result.setKey(recKey); } return result; }
Source:
public SaslServerBuilder setProviderSupplier(Supplier<Provider[]> providerSupplier) { this.providerSupplier = providerSupplier; return this; }

Target:
public SaslServerBuilder setProviderSupplier(Supplier<Provider[]> providerSupplier) { Assert.assertNotNull("providerSupplier", providerSupplier); this.providerSupplier = providerSupplier; return this; }
Source:
protected CommandStatus run() { boolean sameFileExtension = checkFileExtension(); String[] destinationDirs = destination.toString().split("/"); if (sameFileExtension) { try { status = CommandStatus.RUNNING; Files.move(source, source.resolveSibling(destinationDirs[destinationDirs.length - 1]), REPLACE_EXISTING); } catch (IOException e) { e.printStackTrace(); status = CommandStatus.FAILED; return status; } } else { try { status = CommandStatus.RUNNING; Files.move(source, destination); } catch (IOException e) { try { Files.move(source, destination.resolve(source.getFileName())); } catch (IOException e1) { e.printStackTrace(); e1.printStackTrace(); return CommandStatus.FAILED; } } } return CommandStatus.SUCCESS; }

Target:
protected CommandStatus run() { boolean sameFileExtension = checkFileExtension(); String[] destinationDirs = destination.toString().split("/"); logger.info("Moving " + source + " to " + destination); if (sameFileExtension) { try { status = CommandStatus.RUNNING; Files.move(source, source.resolveSibling(destinationDirs[destinationDirs.length - 1]), REPLACE_EXISTING); } catch (IOException e) { logger.error( "The move type was identified as a name change in the same directory, but the move failed!"); logger.error("Returning failed.", e); status = CommandStatus.FAILED; return status; } } else { try { status = CommandStatus.RUNNING; Files.move(source, destination); } catch (IOException e) { try { Files.move(source, destination.resolve(source.getFileName())); } catch (IOException e1) { logger.error("File was supposed to move directories, but move failed!", e1); logger.error("Returning failed."); status = CommandStatus.FAILED; return status; } } } return CommandStatus.SUCCESS; }
Source:
public void onCreate() { ICredentialsRepository iCredentialsRepository = new CredentialsLocalDataSource(); mGetUrlForWebViewsUseCase = new GetUrlForWebViewsUseCase(mDashboardActivity, iCredentialsRepository); IAsyncExecutor asyncExecutor = new AsyncExecutor(); IConnectivityManager mConnectivity = new ConnectivityManager(); IFileDownloader fileDownloader = new FileDownloader( mDashboardActivity.getApplicationContext().getFilesDir(), mDashboardActivity.getApplicationContext().getResources().openRawResource( R.raw.driveserviceprivatekey)); final MediaRepository mediaRepository = new MediaRepository(); mDownloadMediaUseCase = new DownloadMediaUseCase(asyncExecutor, fileDownloader, mConnectivity, mediaRepository, new Callback() { @Override public void onCancel(Exception ex) { if (ex instanceof UserRecoverableAuthIOException) { DashboardActivity.dashboardActivity.startActivityForResult( ((UserRecoverableAuthIOException) ex).getIntent(), REQUEST_AUTHORIZATION); return; } if (ex instanceof GooglePlayServicesAvailabilityIOException) { showDialog( ((GooglePlayServicesAvailabilityIOException) ex) .getConnectionStatusCode()); return; } } @Override public void showToast(String message) { Toast.makeText(mDashboardActivity.getApplicationContext(), message, Toast.LENGTH_LONG).show(); } @Override public void acquireGooglePlayServices() { GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance(); final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable( PreferencesState.getInstance().getContext()); if (apiAvailability.isUserResolvableError(connectionStatusCode)) { showDialog(connectionStatusCode); } } @Override public void onSuccess(HashMap<String, String> syncedFiles) { int correctSyncedFiles = mediaRepository.updateSyncedFiles(syncedFiles); if (correctSyncedFiles > 0) { showToast(String.format("%d files synced", correctSyncedFiles)); } } @Override public void onRemove(String uid) { System.out.println( "downloadFile error (file extension not supported)" + uid); mediaRepository.deleteModel(mediaRepository.findByUid(uid)); } }); }

Target:
public void onCreate() { ICredentialsRepository iCredentialsRepository = new CredentialsLocalDataSource(); mGetUrlForWebViewsUseCase = new GetUrlForWebViewsUseCase(mDashboardActivity, iCredentialsRepository); IAsyncExecutor asyncExecutor = new AsyncExecutor(); IConnectivityManager mConnectivity = new ConnectivityManager(); IFileDownloader fileDownloader = new FileDownloader( mDashboardActivity.getApplicationContext().getFilesDir(), mDashboardActivity.getApplicationContext().getResources().openRawResource( R.raw.driveserviceprivatekey)); final MediaRepository mediaRepository = new MediaRepository(); mDownloadMediaUseCase = new DownloadMediaUseCase(asyncExecutor, fileDownloader, mConnectivity, mediaRepository); }
Source:
public void open() throws IOException; public void append(E entity) throws IOException; public void sync() throws IOException; public void cleanup() throws IOException; } protected final FileSystem fs; private final Path directory; private final DatasetDescriptor descriptor; @VisibleForTesting public FileAppender<E> appender; private Path tempPath; private Path finalPath; private ReaderWriterState state; private int count = 0; @VisibleForTesting final Configuration conf; public FileSystemWriter(FileSystem fs, Path path, DatasetDescriptor descriptor) { Preconditions.checkNotNull(fs, "File system is not defined"); Preconditions.checkNotNull(path, "Destination directory is not defined"); Preconditions.checkNotNull(descriptor, "Descriptor is not defined"); this.fs = fs; this.directory = path; this.descriptor = descriptor; this.conf = new Configuration(fs.getConf()); this.state = ReaderWriterState.NEW; for (String prop : descriptor.listProperties()) { conf.set(prop, descriptor.getProperty(prop)); } }

Target:
public void open() throws IOException; public void append(E entity) throws IOException; public void sync() throws IOException; public void cleanup() throws IOException; } protected final FileSystem fs; private final Path directory; private final DatasetDescriptor descriptor; private FileAppender<E> appender; private Path tempPath; private Path finalPath; private ReaderWriterState state; private int count = 0; @VisibleForTesting final Configuration conf; public FileSystemWriter(FileSystem fs, Path path, DatasetDescriptor descriptor) { Preconditions.checkNotNull(fs, "File system is not defined"); Preconditions.checkNotNull(path, "Destination directory is not defined"); Preconditions.checkNotNull(descriptor, "Descriptor is not defined"); this.fs = fs; this.directory = path; this.descriptor = descriptor; this.conf = new Configuration(fs.getConf()); this.state = ReaderWriterState.NEW; for (String prop : descriptor.listProperties()) { conf.set(prop, descriptor.getProperty(prop)); } }
Source:
protected void onFinishInflate() { super.onFinishInflate(); View.inflate(getContext(), R.layout.merge_login_view, this); loginButton = Views.findById(this, R.id.sign_in_button); Views.findById(this, R.id.login_icon_frame_layout).setBackground(new BubblyDrawable(getContext())); }

Target:
protected void onFinishInflate() { super.onFinishInflate(); View.inflate(getContext(), R.layout.merge_login_view, this); loginButton = Views.findById(this, R.id.sign_in_button); View iconFrame = Views.findById(this, R.id.login_icon_frame_layout); iconFrame.setBackground(new BubblyDrawable(getResources())); }
Source:
private GlusterBrickEntity getBrick(List<GlusterBrickEntity> bricksList, String qualifiedBrickName) { String[] pathElements = qualifiedBrickName.split(StorageConstants.GLUSTER_VOL_SEPARATOR); String hostName = pathElements[0]; for (GlusterBrickEntity brick : bricksList) { VDS vds = getVdsDao().get(brick.getServerId()); String hostAddress; try { hostAddress = InetAddress.getByName(hostName).getHostAddress(); } catch (UnknownHostException e) { return null; } for (VdsNetworkInterface vdsNi : getInterfaceDao().getAllInterfacesForVds(vds.getId())) { if (vdsNi.getIpv4Address().equals(hostAddress) || vdsNi.getIpv6Address().equals(hostAddress)) { return brick; } } } return null; }

Target:
private GlusterBrickEntity getBrick(List<GlusterBrickEntity> bricksList, String qualifiedBrickName) { String[] pathElements = qualifiedBrickName.split(StorageConstants.GLUSTER_VOL_SEPARATOR); String hostName = pathElements[0]; String hostAddress; try { hostAddress = InetAddress.getByName(hostName).getHostAddress(); } catch (UnknownHostException e) { return null; } for (GlusterBrickEntity brick : bricksList) { VDS vds = getVdsDao().get(brick.getServerId()); for (VdsNetworkInterface vdsNi : getInterfaceDao().getAllInterfacesForVds(vds.getId())) { if (vdsNi.getIpv4Address().equals(hostAddress) || vdsNi.getIpv6Address().equals(hostAddress)) { return brick; } } } return null; }
Source:
private String getBinJarName(File binDir, String pattern) { File[] binJarFiles = ConfigurationGenerator.getJarFilesFromPattern(binDir, pattern); if (binJarFiles.length != 1) { throw new RuntimeException("No files found in " + binDir.getAbsolutePath() + " looking for " + pattern); } return binDir.getName() + File.separator + binJarFiles[0].getName(); }

Target:
protected String getBinJarName(File binDir, String pattern) { File[] binJarFiles = ConfigurationGenerator.getJarFilesFromPattern(binDir, pattern); if (binJarFiles.length != 1) { throw new RuntimeException("There should be only 1 file but " + binJarFiles.length + " were found in " + binDir.getAbsolutePath() + " looking for " + pattern); } return binDir.getName() + File.separator + binJarFiles[0].getName(); }
Source:
private String removePort(String url) { try { URI parsedUrl = new URI(url); return (parsedUrl.getPort()) == -1 ? url : url.replaceFirst(":\\d+", ""); } catch (Exception e) { return ""; } }

Target:
private String removePort(String url) { try { URI parsedUrl = new URI(url); return (parsedUrl.getPort() == -1) ? url : updatePort(parsedUrl, -1); } catch (Exception e) { return url; } }
Source:
Study getMockStudy() throws Exception { Study mockStudy = new Study(); mockStudy.setStudyId(1); mockStudy.setStudyInstanceUid("1.2.826.0.1.3680043.8.2186.1.1"); return mockStudy; }

Target:
Study getMockStudy() { Study mockStudy = new Study(); mockStudy.setStudyId(1); mockStudy.setStudyInstanceUid("1.2.826.0.1.3680043.8.2186.1.1"); return mockStudy; }
Source:
protected void committed(int operatorId, long windowId) throws IOException, InterruptedException { LOG.debug("data manager committed {}", windowId); for (Long currentWindow : savedWindows.keySet()) { if (currentWindow <= smallestPendingWindow) { continue; } if (currentWindow <= windowId) { LOG.debug("to transfer {}", currentWindow); smallestPendingWindow = currentWindow; windowsToTransfer.add(currentWindow); } else { break; } } }

Target:
protected void committed(int operatorId, long windowId) throws IOException, InterruptedException { LOG.debug("data manager committed {}", windowId); for (Long currentWindow : savedWindows.keySet()) { if (currentWindow <= largestWindowAddedToTransferQueue) { continue; } if (currentWindow <= windowId) { LOG.debug("to transfer {}", currentWindow); largestWindowAddedToTransferQueue = currentWindow; windowsToTransfer.add(currentWindow); } else { break; } } }
Source:
public void init(final ProcessorContext context, final StateStore root) { this.context = context; initStoreSerde(context); metrics = (StreamsMetricsImpl) context.metrics(); taskName = context.taskId().toString(); final String metricsGroup = "stream-" + metricsScope + "-state-metrics"; final Map<String, String> taskTags = metrics.storeLevelTagMap(taskName, metricsScope, ROLLUP_VALUE); final Map<String, String> storeTags = metrics.storeLevelTagMap(taskName, metricsScope, name()); putTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "put", metrics, metricsGroup, taskName, name(), taskTags, storeTags); fetchTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "fetch", metrics, metricsGroup, taskName, name(), taskTags, storeTags); flushTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "flush", metrics, metricsGroup, taskName, name(), taskTags, storeTags); final Sensor restoreTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "restore", metrics, metricsGroup, taskName, name(), taskTags, storeTags); final long startNs = time.nanoseconds(); try { super.init(context, root); } finally { metrics.recordLatency( restoreTime, startNs, time.nanoseconds() ); } }

Target:
public void init(final ProcessorContext context, final StateStore root) { this.context = context; initStoreSerde(context); metrics = (StreamsMetricsImpl) context.metrics(); taskName = context.taskId().toString(); final String metricsGroup = GROUP_PREFIX + metricsScope + STATE_LEVEL_GROUP_SUFFIX; final Map<String, String> taskTags = metrics.storeLevelTagMap(taskName, metricsScope, ROLLUP_VALUE); final Map<String, String> storeTags = metrics.storeLevelTagMap(taskName, metricsScope, name()); putTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "put", metrics, metricsGroup, taskName, name(), taskTags, storeTags); fetchTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "fetch", metrics, metricsGroup, taskName, name(), taskTags, storeTags); flushTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "flush", metrics, metricsGroup, taskName, name(), taskTags, storeTags); final Sensor restoreTime = createTaskAndStoreLatencyAndThroughputSensors(DEBUG, "restore", metrics, metricsGroup, taskName, name(), taskTags, storeTags); final long startNs = time.nanoseconds(); try { super.init(context, root); } finally { metrics.recordLatency( restoreTime, startNs, time.nanoseconds() ); } }
Source:
public boolean doMonitor(ServiceEmitter emitter) { for (Map.Entry<String, EventReceiverFirehoseMetric> entry : register.getMetrics()) { final String serviceName = entry.getKey(); final EventReceiverFirehoseMetric metric = entry.getValue(); final ServiceMetricEvent.Builder builder = ServiceMetricEvent.builder() .setDimension("serviceName", serviceName) .setDimension( "bufferCapacity", String.valueOf(metric.getCapacity()) ); emitter.emit(builder.build("ingest/firehose/bufferSize", metric.getCurrentBufferSize())); } return true; }

Target:
public boolean doMonitor(ServiceEmitter emitter) { for (Map.Entry<String, EventReceiverFirehoseMetric> entry : register.getMetrics()) { final String serviceName = entry.getKey(); final EventReceiverFirehoseMetric metric = entry.getValue(); final ServiceMetricEvent.Builder builder = ServiceMetricEvent.builder() .setDimension("serviceName", serviceName) .setDimension( "bufferCapacity", String.valueOf(metric.getCapacity()) ); emitter.emit(builder.build("ingest/events/buffered", metric.getCurrentBufferSize())); } return true; }
Source:
protected void handleException(Throwable t) { LOG.warn("Fatal error occurred while closing {}, aborting...", this.encodedRegionName, t); getServer().abort("Failed to close " + this.encodedRegionName, t); }

Target:
protected void handleException(Throwable t) { LOG.warn("Fatal error occurred while closing region {}, aborting...", encodedName, t); getServer().abort("Failed to close region " + encodedName + " and can not recover", t); }
Source:
protected void addChildVisual(final EditPart childEditPart, final int index) { boolean visible = true; if (childEditPart instanceof InterfaceEditPart) { IInterfaceElement iElement = ((InterfaceEditPart) childEditPart).getModel(); if (iElement instanceof AdapterDeclaration){ visible = isVarVisible(); } } EditPart refEditPart = null; if(index < getChildren().size()){ refEditPart = (EditPart)getChildren().get(index); } if (childEditPart instanceof InterfaceEditPart) { IFigure child = ((GraphicalEditPart) childEditPart).getFigure(); if (((InterfaceEditPart) childEditPart).getModel().isIsInput()) { if (((InterfaceEditPart) childEditPart).isEvent()) { insertChild(getLeftEventInterfaceContainer(), refEditPart, child); } else { if (visible) { insertChild(getLeftVarInterfaceContainer(), refEditPart, child); } else { insertChild(getLeftInterfaceContainer(), refEditPart, child); } } } else { if (((InterfaceEditPart) childEditPart).isEvent()) { insertChild(getRightEventInterfaceContainer(), refEditPart, child); } else { if (visible) { insertChild(getRightVarInterfaceContainer(), refEditPart, child); } else { insertChild(getRightInterfaceContainer(), refEditPart, child); } } } child.setVisible(visible); } else { super.addChildVisual(childEditPart, -1); } }

Target:
protected void addChildVisual(final EditPart childEditPart, final int index) { EditPart refEditPart = null; if (index < getChildren().size()) { refEditPart = (EditPart) getChildren().get(index); } if (childEditPart instanceof InterfaceEditPart) { IFigure child = ((GraphicalEditPart) childEditPart).getFigure(); insertChild(getChildVisualContainer(childEditPart), refEditPart, child); child.setVisible(isVarVisible(childEditPart)); } else { super.addChildVisual(childEditPart, -1); } }
Source:
public void onSendMessage(View v) { String inputMessage = mInputField.getText().toString().trim(); mInputField.setText(""); if (inputMessage.length() > 0 || mSendImage){ Content content; if (mSendImage && mImage != null) { content = new ImageContent(mImage, inputMessage); mSendImage = false; mImage = null; mImageThumbnail.setImageBitmap(null); mImageThumbnail.setPadding(0, 0, 0, 0); } else { content = new TextContent(inputMessage); } Message message = new Message("message", new Id(0), mUser.getId(), content, new Date()); if (mType == ContentType.GROUP_MESSAGES) { Log.d("MessageActivity", "Send group message"); mGroupMessageAdapter.add(message); mGroupMessageAdapter.notifyDataSetChanged(); ((GroupMessageFragment) mCurrentFragment).getMessageListView() .smoothScrollToPosition(mGroupMessageAdapter.getCount() - 1); NodeMessageRequest request = new NodeMessageRequest(message, mGroup.getId(), mGroup.getVisibility()); YieldsApplication.getBinder().sendRequest(request); } else { mCommentAdapter.add(message); mCommentAdapter.notifyDataSetChanged(); ((CommentFragment) mCurrentFragment).getCommentListView() .smoothScrollToPosition(mCommentAdapter.getCount() - 1); NodeMessageRequest request = new NodeMessageRequest(message, mCommentMessage.getId(), Group.GroupVisibility.PRIVATE); YieldsApplication.getBinder().sendRequest(request); } YieldsApplication.getGroup().addMessage(message); } }

Target:
public void onSendMessage(View v) { String inputMessage = mInputField.getText().toString().trim(); mInputField.setText(""); if (!inputMessage.isEmpty() || mSendImage){ Content content; if (mSendImage && mImage != null) { content = new ImageContent(mImage, inputMessage); mSendImage = false; mImage = null; mImageThumbnail.setImageBitmap(null); mImageThumbnail.setPadding(0, 0, 0, 0); } else { content = new TextContent(inputMessage); } Message message = new Message("message", new Id(0), mUser.getId(), content, new Date()); if (mType == ContentType.GROUP_MESSAGES) { Log.d("MessageActivity", "Send group message"); mGroupMessageAdapter.add(message); mGroupMessageAdapter.notifyDataSetChanged(); ((GroupMessageFragment) mCurrentFragment).getMessageListView() .smoothScrollToPosition(mGroupMessageAdapter.getCount() - 1); NodeMessageRequest request = new NodeMessageRequest(message, mGroup.getId(), mGroup.getVisibility()); YieldsApplication.getBinder().sendRequest(request); } else { mCommentAdapter.add(message); mCommentAdapter.notifyDataSetChanged(); ((CommentFragment) mCurrentFragment).getCommentListView() .smoothScrollToPosition(mCommentAdapter.getCount() - 1); NodeMessageRequest request = new NodeMessageRequest(message, mCommentMessage.getId(), Group.GroupVisibility.PRIVATE); YieldsApplication.getBinder().sendRequest(request); } YieldsApplication.getGroup().addMessage(message); } }
Source:
@After public void tearDown() throws InterruptedException { clientListener.assertExhausted(); client.connectionPool().evictAll(); if (client.connectionPool().connectionCount() > 0) { System.out.println("Delaying to avoid flakes"); Thread.sleep(500L); System.out.println("After delay: " + client.connectionPool().connectionCount()); } }

Target:
@After public void tearDown() throws InterruptedException { clientListener.assertExhausted(); }
Source:
public <T> void updateMetricExpiration(Metric<T> metric) { if (!MetricType.STRING.equals(metric.getType())) { long expiration = 0; if (metric.getDataRetention() != null) { expiration = System.currentTimeMillis() + metric.getDataRetention() * DAY_TO_MILLIS; } else { expiration = System.currentTimeMillis() + this.getTTL(metric.getMetricId()) * DAY_TO_MILLIS; } ListenableFutureObservable .from(dataAccess.updateMetricExpirationIndex(metric.getMetricId(), expiration), metricsTasks) .doOnError(t -> log.error("Failure to update expiration index", t)); } }

Target:
public <T> Observable<Void> updateMetricExpiration(Metric<T> metric) { if (!MetricType.STRING.equals(metric.getType())) { long expiration = 0; if (metric.getDataRetention() != null) { expiration = DateTimeService.now.get().getMillis() + metric.getDataRetention() * DAY_TO_MILLIS; } else { expiration = DateTimeService.now.get().getMillis() + this.getTTL(metric.getMetricId()) * DAY_TO_MILLIS; } return dataAccess.updateMetricExpirationIndex(metric.getMetricId(), expiration) .doOnError(t -> log.error("Failure to update expiration index", t)) .flatMap(r -> null); } return Observable.empty(); }
Source:
public HttpConnectionInterceptorContext interceptResponse(HttpConnectionInterceptorContext context) { HttpURLConnection connection = context.connection.getConnection(); try { boolean renewCookie = false; int statusCode = connection.getResponseCode(); switch (statusCode) { case HttpURLConnection.HTTP_FORBIDDEN: InputStream errorStream = connection.getErrorStream(); String errorString = new String(IOUtils.toString(errorStream, "UTF-8")); try { JsonObject errorResponse = new Gson().fromJson(errorString, JsonObject .class); String error = errorResponse.getAsJsonPrimitive ("error").getAsString(); String reason = errorResponse.getAsJsonPrimitive ("reason").getAsString(); if (!"credentials_expired".equals(error)) { throw new HttpConnectionInterceptorException(error, reason); } else { renewCookie = true; } } catch (JsonParseException e) { throw new HttpConnectionInterceptorException(errorString); } finally { errorStream.close(); } break; case HttpURLConnection.HTTP_UNAUTHORIZED: renewCookie = true; break; default: String cookieHeader = connection.getHeaderField("Set-Cookie"); if(cookieHeader != null){ cookie = this.extractCookieFromHeaderValue(cookieHeader); } break; } if (renewCookie) { cookie = getCookie(connection.getURL(), context); if (cookie != null) { context.replayRequest = true; } else { context.replayRequest = false; } } } catch (IOException e) { logger.log(Level.SEVERE, "Failed to get response code from request", e); } return context; }

Target:
public HttpConnectionInterceptorContext interceptResponse(HttpConnectionInterceptorContext context) { HttpURLConnection connection = context.connection.getConnection(); String cookieHeader = connection.getHeaderField("Set-Cookie"); if(cookieHeader != null){ cookie = this.extractCookieFromHeaderValue(cookieHeader); return context; } try { boolean renewCookie = false; int statusCode = connection.getResponseCode(); switch (statusCode) { case HttpURLConnection.HTTP_FORBIDDEN: InputStream errorStream = connection.getErrorStream(); String errorString = new String(IOUtils.toString(errorStream, "UTF-8")); try { JsonObject errorResponse = new Gson().fromJson(errorString, JsonObject .class); String error = errorResponse.getAsJsonPrimitive ("error").getAsString(); String reason = errorResponse.getAsJsonPrimitive ("reason").getAsString(); if (!"credentials_expired".equals(error)) { throw new HttpConnectionInterceptorException(error, reason); } else { renewCookie = true; } } catch (JsonParseException e) { throw new HttpConnectionInterceptorException(errorString); } finally { errorStream.close(); } break; case HttpURLConnection.HTTP_UNAUTHORIZED: renewCookie = true; break; default: break; } if (renewCookie) { cookie = getCookie(connection.getURL(), context); if (cookie != null) { context.replayRequest = true; } else { context.replayRequest = false; } } } catch (IOException e) { logger.log(Level.SEVERE, "Failed to get response code from request", e); } return context; }
Source:
void refreshTokenWithoutCache(final String refreshToken, final AuthenticationRequest authenticationRequest, final AuthenticationCallback<AuthenticationResult> externalCallback) { Logger.setCorrelationId(authenticationRequest.getCorrelationId()); Logger.v(TAG, "Refresh token without cache"); final CallbackHandler callbackHandle = new CallbackHandler(getHandler(), externalCallback); THREAD_EXECUTOR.execute(new Runnable() { @Override public void run() { try { validateAcquireTokenRequest(authenticationRequest); final AcquireTokenSilentHandler acquireTokenSilentHandler = new AcquireTokenSilentHandler(mContext, authenticationRequest, mTokenCacheAccessor); final AuthenticationResult authResult = acquireTokenSilentHandler.acquireTokenWithRefreshToken(refreshToken); mAPIEvent.setWasApiCallSuccessful(true); callbackHandle.onSuccess(authResult); } catch (final AuthenticationException authenticationException) { mAPIEvent.setWasApiCallSuccessful(false); callbackHandle.onError(authenticationException); } finally { Telemetry.getInstance().stopEvent(authenticationRequest.getTelemetryRequestId(), mAPIEvent, mAPIEvent.getEventName()); Telemetry.getInstance().flush(authenticationRequest.getTelemetryRequestId()); } } }); }

Target:
void refreshTokenWithoutCache(final String refreshToken, final AuthenticationRequest authenticationRequest, final AuthenticationCallback<AuthenticationResult> externalCallback) { Logger.setCorrelationId(authenticationRequest.getCorrelationId()); Logger.v(TAG, "Refresh token without cache"); final CallbackHandler callbackHandle = new CallbackHandler(getHandler(), externalCallback); THREAD_EXECUTOR.execute(new Runnable() { @Override public void run() { try { validateAcquireTokenRequest(authenticationRequest); final AcquireTokenSilentHandler acquireTokenSilentHandler = new AcquireTokenSilentHandler(mContext, authenticationRequest, mTokenCacheAccessor); final AuthenticationResult authResult = acquireTokenSilentHandler.acquireTokenWithRefreshToken(refreshToken); mAPIEvent.setWasApiCallSuccessful(true, null); mAPIEvent.setIdToken(authResult.getIdToken()); callbackHandle.onSuccess(authResult); } catch (final AuthenticationException authenticationException) { mAPIEvent.setWasApiCallSuccessful(false, authenticationException); callbackHandle.onError(authenticationException); } finally { mAPIEvent.setCorrelationId(authenticationRequest.getCorrelationId().toString()); mAPIEvent.stopTelemetryAndFlush(); } } }); }
Source:
public BaseAsset() { this.channelListeners = Collections.synchronizedSet(new HashSet<>()); this.monitor = new ReentrantLock(); }

Target:
public BaseAsset() { this.channelListeners = new CopyOnWriteArraySet<>(); this.monitor = new ReentrantLock(); }
Source:
private boolean isValueDefined(int valueStart, int valueEnd) { return valueStart != -1 && valueStart != valueEnd; }

Target:
private static boolean isValueDefined(int valueStart, int valueEnd) { return valueStart != -1 && valueStart != valueEnd; }