auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void endDocument() throws SAXException { xmlInRead--; if (xmlInRead != 0) return; Map<String, String> remoteUrls = new HashMap<String, String>(); URI baseUri; try { baseUri = new URI(baseUrl); } catch (URISyntaxException e) { throw new SAXException(e); } if (defaultRevision == null && defaultRemote != null) { Remote remote = remotes.get(defaultRemote); if (remote != null && remote.revision != null) { defaultRevision = remote.revision; } } for (RepoProject proj : projects) { String remote = proj.getRemote(); String revision = defaultRevision; if (remote == null) { if (defaultRemote == null) { if (filename != null) throw new SAXException(MessageFormat.format( RepoText.get().errorNoDefaultFilename, filename)); else throw new SAXException( RepoText.get().errorNoDefault); } remote = defaultRemote; } else { Remote r = remotes.get(remote); if (r != null && r.revision != null) { revision = r.revision; } } String remoteUrl = remoteUrls.get(remote); if (remoteUrl == null) { remoteUrl = baseUri.resolve(remotes.get(remote).fetch).toString(); if (!remoteUrl.endsWith("/")) remoteUrl = remoteUrl + "/"; remoteUrls.put(remote, remoteUrl); } proj.setUrl(remoteUrl + proj.getName()) .setDefaultRevision(revision); } filteredProjects.addAll(projects); removeNotInGroup(); removeOverlaps(); }

Target:
public void endDocument() throws SAXException { xmlInRead--; if (xmlInRead != 0) return; Map<String, String> remoteUrls = new HashMap<String, String>(); URI baseUri; try { baseUri = new URI(baseUrl); } catch (URISyntaxException e) { throw new SAXException(e); } if (defaultRevision == null && defaultRemote != null) { Remote remote = remotes.get(defaultRemote); if (remote != null) { defaultRevision = remote.revision; } } for (RepoProject proj : projects) { String remote = proj.getRemote(); String revision = defaultRevision; if (remote == null) { if (defaultRemote == null) { if (filename != null) throw new SAXException(MessageFormat.format( RepoText.get().errorNoDefaultFilename, filename)); else throw new SAXException( RepoText.get().errorNoDefault); } remote = defaultRemote; } else { Remote r = remotes.get(remote); if (r != null && r.revision != null) { revision = r.revision; } } String remoteUrl = remoteUrls.get(remote); if (remoteUrl == null) { remoteUrl = baseUri.resolve(remotes.get(remote).fetch).toString(); if (!remoteUrl.endsWith("/")) remoteUrl = remoteUrl + "/"; remoteUrls.put(remote, remoteUrl); } proj.setUrl(remoteUrl + proj.getName()) .setDefaultRevision(revision); } filteredProjects.addAll(projects); removeNotInGroup(); removeOverlaps(); }
Source:
public Response downloadDumpFile(@PathParam("topo-id") String topologyId, @PathParam("host-port") String hostPort, @PathParam("filename") String fileName, @Context HttpServletRequest request) throws IOException { String host = request.getRemoteHost(); String decodedHost = Utils.urlDecodeUtf8(host); String user = httpCredsHandler.getUserName(request); try { return profileHandler.downloadDumpFile(decodedHost, topologyId, hostPort, fileName, user); } catch (IOException e) { numDownloadDumpExceptions.mark(); throw e; } }

Target:
public Response downloadDumpFile(@PathParam("topo-id") String topologyId, @PathParam("host-port") String hostPort, @PathParam("filename") String fileName, @Context HttpServletRequest request) throws IOException { String user = httpCredsHandler.getUserName(request); try { String host = InetAddress.getLocalHost().getCanonicalHostName(); return profileHandler.downloadDumpFile(host, topologyId, hostPort, fileName, user); } catch (IOException e) { numDownloadDumpExceptions.mark(); throw e; } }
Source:
private boolean isSanitizedString(String s){ if ((s.indexOf('<') >= 0) || (s.indexOf('>') >= 0) || (s.indexOf('\"') >= 0) || (s.indexOf('/') >= 0) || (s.indexOf('\'') >= 0)) { return false; } else if ((s.indexOf("&lt;") >= 0) || (s.indexOf("&gt;") >= 0) || (s.indexOf("&quot;") >= 0) || (s.indexOf("&#x2f;") >= 0) || (s.indexOf("&#39;") >= 0) || (s.indexOf("&amp;") >= 0)) { return true; } return false; }

Target:
private boolean isSanitizedString(String s){ if (s == null) return false; if ((s.indexOf('<') >= 0) || (s.indexOf('>') >= 0) || (s.indexOf('\"') >= 0) || (s.indexOf('/') >= 0) || (s.indexOf('\'') >= 0)) { return false; } else if ((s.indexOf("&lt;") >= 0) || (s.indexOf("&gt;") >= 0) || (s.indexOf("&quot;") >= 0) || (s.indexOf("&#x2f;") >= 0) || (s.indexOf("&#39;") >= 0) || (s.indexOf("&amp;") >= 0)) { return true; } return false; }
Source:
private String getSimpleTextFor(Repository repository) { File directory = repository.getDirectory(); StringBuilder sb = new StringBuilder(); sb.append(directory.getParentFile().getName()); sb.append(" - "); sb.append(directory.getAbsolutePath()); return sb.toString(); }

Target:
private String getSimpleTextFor(Repository repository) { File directory; if (!repository.isBare()) directory = repository.getDirectory().getParentFile(); else directory = repository.getDirectory(); StringBuilder sb = new StringBuilder(); sb.append(directory.getName()); sb.append(" - "); sb.append(directory.getAbsolutePath()); return sb.toString(); }
Source:
public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(WAP_PUSH_RECEIVED_ACTION)) { String mimeType = intent.getType(); if (mimeType.equals(CONTENT_MIME_TYPE_B_EMN)) { byte[] wbxml = intent.getByteArrayExtra("data"); if (wbxml == null) { return; } String emailAddress = decode(wbxml); if (emailAddress.length()>0) { if (Email.DEBUG) { Log.d(Email.LOG_TAG, "CONTENT_MIME_TYPE_B_EMN " + "received for email " + emailAddress); } MailService.actionCheckMail(context, emailAddress); } } } }

Target:
public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(WAP_PUSH_RECEIVED_ACTION)) { String mimeType = intent.getType(); if (mimeType.equals(CONTENT_MIME_TYPE_B_EMN)) { byte[] wbxml = intent.getByteArrayExtra("data"); if (wbxml == null) { return; } String emailAddress = decode(wbxml); if (emailAddress!=null && !TextUtils.isEmpty(emailAddress)) { if (Email.DEBUG) { Log.d(Email.LOG_TAG, "CONTENT_MIME_TYPE_B_EMN " + "received for email " + emailAddress); } MailService.actionCheckMail(context, emailAddress); } } } }
Source:
private void enforceNego(HttpServletResponse response) throws IOException { for (String scheme: new HashSet<>(schemes)) { response.setHeader("WWW-Authenticate", scheme); } response.sendError(HttpServletResponse.SC_UNAUTHORIZED); }

Target:
private void enforceNego(HttpServletResponse response) throws IOException { for (String scheme: schemes) { response.setHeader("WWW-Authenticate", scheme); } response.sendError(HttpServletResponse.SC_UNAUTHORIZED); }
Source:
protected WorkbenchJob doCreateRefreshJob() { WorkbenchJob job = super.doCreateRefreshJob(); job.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { maintainAllCheckIntegrity(); } }); return job; }

Target:
protected WorkbenchJob doCreateRefreshJob() { WorkbenchJob job = super.doCreateRefreshJob(); job.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { if (getCheckboxTreeViewer().getTree().isDisposed()) { return; } maintainAllCheckIntegrity(); } }); return job; }
Source:
public void testFindStorageDomainForMemoryWithSingleDomain() { verifyDomainForMemory(Arrays.asList(validStorageDomain)); }

Target:
public void testFindStorageDomainForMemoryWithSingleDomain() { verifyDomainForMemory(Collections.singletonList(validStorageDomain)); }
Source:
public void testLinkedResourceFiles() throws Exception { IProject[] prjs= new IProject[]{fProject}; fProject.create(new NullProgressMonitor()); fProject.open(new NullProgressMonitor()); createFolder(fProject, "folder1"); File f= File.createTempFile("extern", "h"); IPath location= Path.fromOSString(f.getAbsolutePath()); IFile file1= fProject.getFile("linked1"); IFile file2= fProject.getFile("linked2.h"); file1.createLink(location, 0, new NullProgressMonitor()); file2.createLink(location, 0, new NullProgressMonitor()); IFile[] files = ResourceLookup.findFilesForLocation(location); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path(location.lastSegment()), prjs, false); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path("linked2.h"), prjs, false); assertEquals(0, files.length); f.delete(); }

Target:
public void testLinkedResourceFiles() throws Exception { IProject[] prjs= new IProject[]{fProject}; fProject.create(new NullProgressMonitor()); fProject.open(new NullProgressMonitor()); createFolder(fProject, "folder1"); File f= File.createTempFile("extern", "h"); f.deleteOnExit(); IPath location= Path.fromOSString(f.getAbsolutePath()); IFile file1= fProject.getFile("linked1"); IFile file2= fProject.getFile("linked2.h"); file1.createLink(location, 0, new NullProgressMonitor()); file2.createLink(location, 0, new NullProgressMonitor()); IFile[] files = ResourceLookup.findFilesForLocation(location); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path(location.lastSegment()), prjs, false); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path("linked2.h"), prjs, false); assertEquals(0, files.length); }
Source:
public void testLoginChoosingAuthenticationService() throws Exception { securedLoginServiceImpl = new SecuredLoginServiceImpl(authenticationService, sessionService, sessionAccessor, identityService, logger); final Map<String, Serializable> credentials = new HashMap<String, Serializable>(); final String login = "julien"; final String password = "julien"; credentials.put(AuthenticationConstants.BASIC_USERNAME, login); credentials.put(AuthenticationConstants.BASIC_PASSWORD, password); when(authenticationService.checkUserCredentials(login, password)).thenReturn(true); final String result = securedLoginServiceImpl.loginChoosingAppropriateAuthenticationService(credentials); verify(authenticationService, times(1)).checkUserCredentials(login, password); assertThat(result).isSameAs(login); }

Target:
public void testLoginChoosingAuthenticationService() throws Exception { securedLoginServiceImpl = instantiateLoginServiceWithAuthenticationService(); final Map<String, Serializable> credentials = new HashMap<String, Serializable>(); final String login = "julien"; final String password = "julien"; credentials.put(AuthenticationConstants.BASIC_USERNAME, login); credentials.put(AuthenticationConstants.BASIC_PASSWORD, password); when(authenticationService.checkUserCredentials(login, password)).thenReturn(true); final String result = securedLoginServiceImpl.loginChoosingAppropriateAuthenticationService(credentials); verify(authenticationService, times(1)).checkUserCredentials(login, password); assertThat(result).isSameAs(login); }
Source:
private void gatherAllObjectsForEvents(ResIterator eventIt, List<PremisEventObject> events) { while (eventIt.hasNext()) { Resource eventResc = eventIt.nextResource(); PID eventPid = PIDs.get(eventResc.getURI()); Model eventModel = ModelFactory.createDefaultModel(); StmtIterator stmtIt = eventResc.listProperties(); eventModel.add(stmtIt); stmtIt.close(); stmtIt = eventResc.listProperties(); while (stmtIt.hasNext()) { RDFNode objNode = stmtIt.next().getObject(); if (objNode.isResource()) { StmtIterator objIt = objNode.asResource().listProperties(); if (objIt != null) { eventModel.add(objIt); } objIt.close(); } } stmtIt.close(); PremisEventObject event = new PremisEventObject(eventPid, repository, repository.getRepositoryObjectDataLoader()); event.storeModel(eventModel); events.add(event); } }

Target:
private void gatherAllObjectsForEvents(ResIterator eventIt, List<PremisEventObject> events) { while (eventIt.hasNext()) { Resource eventResc = eventIt.nextResource(); PID eventPid = PIDs.get(eventResc.getURI()); Model eventModel = ModelFactory.createDefaultModel(); StmtIterator stmtIt = eventResc.listProperties(); eventModel.add(stmtIt); stmtIt.close(); stmtIt = eventResc.listProperties(); while (stmtIt.hasNext()) { RDFNode objNode = stmtIt.next().getObject(); if (objNode.isResource()) { StmtIterator objIt = objNode.asResource().listProperties(); if (objIt != null) { eventModel.add(objIt); objIt.close(); } } } stmtIt.close(); PremisEventObject event = new PremisEventObject(eventPid, repository, repository.getRepositoryObjectDataLoader()); event.storeModel(eventModel); events.add(event); } }
Source:
void birthdate() throws Exception { QueryParser queryParser = new QueryParser(FIELD_BIRTHDATE, getKbIndexAnalyzer()); queryParser.setAllowLeadingWildcard(true); Query q = queryParser.parse("*"); LOG.info("Starting the search using query: {}", q.toString()); Set<Integer> matchingDocIds = new HashSet<>(5); getKbIndexSearcher().search(q, new CheckHits.SetCollector(matchingDocIds)); LOG.info("Found matching documents, retrieving...", matchingDocIds.size()); matchingDocIds.forEach((Integer docId) -> { Document doc = null; try { doc = getKbIndexReader().document(docId); } catch (IOException e) { LOG.warn("Error retrieving document with id: {}. Ignoring.", docId); return; } String freebaseURI = doc.get(LuceneRDFDocumentGenerator.FIELD_SUBJECT); String[] birthdates = doc.getValues(FIELD_BIRTHDATE); String[] labels = doc.getValues(FIELD_LABEL); String englishLabel = null; for (String label : labels) { Literal literal = NTriplesUtil.parseLiteral(label, valueFactory); if (literal.getLanguage().orElse("N/A").toLowerCase().equals("en")) { englishLabel = literal.stringValue(); break; } } if (englishLabel == null || freebaseURI == null || birthdates == null || birthdates.length == 0) return; String freebaseId = freebaseUriToFreebaseId(freebaseURI); for (String birthdate : birthdates) { String birthdateVal = extractValueFromTypedLiteralString(birthdate); writeToTrainingFiles(TRAINING_DATA_OUTPUT_FILE_EXAMPLES, freebaseId, englishLabel, birthdateVal); } }); }

Target:
void birthdate() throws ParseException, IOException { QueryParser queryParser = new QueryParser(FIELD_BIRTHDATE, getKbIndexAnalyzer()); queryParser.setAllowLeadingWildcard(true); Query q = queryParser.parse("*"); LOG.info("Starting the search using query: {}", q.toString()); Set<Integer> matchingDocIds = new HashSet<>(); getKbIndexSearcher().search(q, new CheckHits.SetCollector(matchingDocIds)); LOG.info("Found matching documents, retrieving...", matchingDocIds.size()); matchingDocIds.forEach((Integer docId) -> { Document doc = null; try { doc = getKbIndexReader().document(docId); } catch (IOException e) { LOG.warn("Error retrieving document with id: {}. Ignoring.", docId); return; } String freebaseURI = doc.get(LuceneRDFDocumentGenerator.FIELD_SUBJECT); String[] birthdates = doc.getValues(FIELD_BIRTHDATE); String[] labels = doc.getValues(FIELD_LABEL); String englishLabel = null; for (String label : labels) { Literal literal = NTriplesUtil.parseLiteral(label, valueFactory); if (literal.getLanguage().orElse("N/A").toLowerCase().equals("en")) { englishLabel = literal.stringValue(); break; } } if (englishLabel == null || freebaseURI == null || birthdates == null || birthdates.length == 0) return; String freebaseId = freebaseUriToFreebaseId(freebaseURI); for (String birthdate : birthdates) { String birthdateVal = extractValueFromTypedLiteralString(birthdate); writeToTrainingFile(TRAINING_DATA_OUTPUT_FILE_EXAMPLES, freebaseId, englishLabel, birthdateVal); } }); }
Source:
private void handleMouseEvent(MouseEvent t) { if (parentPane.getSelectedBlock().isPresent() && parentPane.getSelectedBlock().get().equals(this) && t.getButton().equals(MouseButton.PRIMARY)) { contextMenu.show(t); } else { parentPane.setSelectedBlock(this); } }

Target:
private void handleMouseEvent(MouseEvent t) { if (parentPane.getSelectedBlock().isPresent() && parentPane.getSelectedBlock().get().equals(this) && t.getButton().equals(MouseButton.PRIMARY)) { circleMenu.show(t); } else { parentPane.setSelectedBlock(this); } }
Source:
private void connectAndSubscribe() throws MqttException { this.client = this.clientFactory.getClientInstance(this.getUrl(), this.getClientId()); MqttConnectOptions connectionOptions = this.clientFactory.getConnectionOptions(); Assert.state(this.getUrl() != null || connectionOptions.getServerURIs() != null, "If no 'url' provided, connectionOptions.getServerURIs() must not be null"); this.client.connect(connectionOptions); try { this.client.subscribe(this.getTopic()); } catch (MqttException e) { this.client.disconnect(); throw e; } if (this.client.isConnected()) { this.client.setCallback(this); this.connected = true; if (this.reconnectFuture != null) { this.cancelReconnect(); } if (logger.isDebugEnabled()) { logger.debug("Connected and subscribed to " + Arrays.asList(this.getTopic())); } } }

Target:
private void connectAndSubscribe() throws MqttException { MqttConnectOptions connectionOptions = this.clientFactory.getConnectionOptions(); Assert.state(this.getUrl() != null || connectionOptions.getServerURIs() != null, "If no 'url' provided, connectionOptions.getServerURIs() must not be null"); this.client = this.clientFactory.getClientInstance(this.getUrl(), this.getClientId()); this.client.connect(connectionOptions); try { this.client.subscribe(this.getTopic()); } catch (MqttException e) { this.client.disconnect(); throw e; } if (this.client.isConnected()) { this.client.setCallback(this); this.connected = true; if (this.reconnectFuture != null) { this.cancelReconnect(); } if (logger.isDebugEnabled()) { logger.debug("Connected and subscribed to " + Arrays.asList(this.getTopic())); } } }
Source:
public ServletOutputStream getOutputStream() throws IOException { final ServletOutputStream originalStream = this.getResponse().getOutputStream(); return this.out; }

Target:
public ServletOutputStream getOutputStream() { return this.out; }
Source:
private void logConfiguration() { LOGGER.debug("{} - configuration:", poolName); final Set<String> propertyNames = new TreeSet<>(PropertyElf.getPropertyNames(HikariConfig.class)); for (String prop : propertyNames) { try { Object value = PropertyElf.getProperty(prop, this); if ("dataSourceProperties".equals(prop)) { Properties dsProps = PropertyElf.copyProperties(dataSourceProperties); dsProps.setProperty("password", "<masked>"); value = dsProps; } value = (prop.contains("password") ? "<masked>" : value); LOGGER.debug((prop + "................................................").substring(0, 32) + value); } catch (Exception e) { continue; } } }

Target:
private void logConfiguration() { LOGGER.debug("{} - configuration:", poolName); final Set<String> propertyNames = new TreeSet<>(PropertyElf.getPropertyNames(HikariConfig.class)); for (String prop : propertyNames) { try { Object value = PropertyElf.getProperty(prop, this); if ("dataSourceProperties".equals(prop)) { Properties dsProps = PropertyElf.copyProperties(dataSourceProperties); dsProps.setProperty("password", "<masked>"); value = dsProps; } if (prop.contains("password")) { value = "<masked>"; } else if (value instanceof String) { value = "\"" + value + "\""; } LOGGER.debug((prop + "................................................").substring(0, 32) + value); } catch (Exception e) { continue; } } }
Source:
protected IStatus run(IProgressMonitor monitor) { try { SubmoduleWalk walk = SubmoduleWalk.forIndex(repo); boolean refresh = false; while (!monitor.isCanceled() && walk.next()) { for (StagingEntry entry : nodes) { boolean isSubmodule = entry.getPath().equals( walk.getPath()); entry.setSubmodule(isSubmodule); if (isSubmodule) refresh = true; } } if (refresh && !stagingView.isDisposed()) stagingView.refreshViewersPreservingExpandedElements(); } catch (IOException e) { return Activator.createErrorStatus( UIText.StagingViewContentProvider_SubmoduleError, e); } if (monitor.isCanceled()) return Status.CANCEL_STATUS; return Status.OK_STATUS; }

Target:
protected IStatus run(IProgressMonitor monitor) { if (monitor.isCanceled() || stagingView.isDisposed()) return Status.CANCEL_STATUS; try { SubmoduleWalk walk = SubmoduleWalk.forIndex(repo); boolean refresh = false; while (!monitor.isCanceled() && walk.next()) { for (StagingEntry entry : nodes) { if (entry.getPath().equals(walk.getPath())) { entry.setSubmodule(true); refresh = true; } } } if (refresh && !stagingView.isDisposed()) stagingView.refreshViewersPreservingExpandedElements(); } catch (IOException e) { return Activator.createErrorStatus( UIText.StagingViewContentProvider_SubmoduleError, e); } if (monitor.isCanceled()) return Status.CANCEL_STATUS; return Status.OK_STATUS; }
Source:
public int compare(String integer, String integer2) { Double i1 = Double.valueOf(integer != null ? integer : ""); Double i2 = Double.valueOf(integer2 != null ? integer2 : ""); return i1.compareTo(i2); }

Target:
public int compare(String integer, String integer2) { Double i1 = Double.valueOf(integer); Double i2 = Double.valueOf(integer2); return i1.compareTo(i2); }
Source:
public void onCreate() { super.onCreate(); if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2){ bluetoothAdapter = ((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter(); if(bluetoothAdapter == null) return; } notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); DATABASE_TABLES = Bluetooth_Provider.DATABASE_TABLES; TABLES_FIELDS = Bluetooth_Provider.TABLES_FIELDS; CONTEXT_URIS = new Uri[]{Bluetooth_Sensor.CONTENT_URI, Bluetooth_Data.CONTENT_URI}; IntentFilter filter = new IntentFilter(); filter.addAction(Bluetooth.ACTION_AWARE_BLUETOOTH_REQUEST_SCAN); filter.addAction(BluetoothDevice.ACTION_FOUND); filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED); registerReceiver(bluetoothMonitor, filter); Intent backgroundService = new Intent(ACTION_AWARE_BLUETOOTH_REQUEST_SCAN); bluetoothScan = PendingIntent.getBroadcast(this, 0, backgroundService, PendingIntent.FLAG_UPDATE_CURRENT); REQUIRED_PERMISSIONS.add(Manifest.permission.BLUETOOTH); REQUIRED_PERMISSIONS.add(Manifest.permission.BLUETOOTH_ADMIN); REQUIRED_PERMISSIONS.add(Manifest.permission.ACCESS_COARSE_LOCATION); enableBT = new Intent(this, Bluetooth.class); enableBT.putExtra("action", ACTION_AWARE_ENABLE_BT); if (!bluetoothAdapter.isEnabled()) { notifyMissingBluetooth(getApplicationContext()); } if (Aware.DEBUG) Log.d(TAG, "Bluetooth service created!"); }

Target:
public void onCreate() { super.onCreate(); alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); bluetoothAdapter = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)? ((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter() : BluetoothAdapter.getDefaultAdapter(); if(bluetoothAdapter == null) return; notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); DATABASE_TABLES = Bluetooth_Provider.DATABASE_TABLES; TABLES_FIELDS = Bluetooth_Provider.TABLES_FIELDS; CONTEXT_URIS = new Uri[]{Bluetooth_Sensor.CONTENT_URI, Bluetooth_Data.CONTENT_URI}; IntentFilter filter = new IntentFilter(); filter.addAction(Bluetooth.ACTION_AWARE_BLUETOOTH_REQUEST_SCAN); filter.addAction(BluetoothDevice.ACTION_FOUND); filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED); filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); registerReceiver(bluetoothMonitor, filter); Intent backgroundService = new Intent(ACTION_AWARE_BLUETOOTH_REQUEST_SCAN); bluetoothScan = PendingIntent.getBroadcast(this, 0, backgroundService, PendingIntent.FLAG_UPDATE_CURRENT); REQUIRED_PERMISSIONS.add(Manifest.permission.BLUETOOTH); REQUIRED_PERMISSIONS.add(Manifest.permission.BLUETOOTH_ADMIN); REQUIRED_PERMISSIONS.add(Manifest.permission.ACCESS_COARSE_LOCATION); enableBT = new Intent(this, Bluetooth.class); enableBT.putExtra("action", ACTION_AWARE_ENABLE_BT); if (!bluetoothAdapter.isEnabled()) { notifyMissingBluetooth(getApplicationContext(), false); } if (Aware.DEBUG) Log.d(TAG, "Bluetooth service created!"); }
Source:
public boolean equals(Object otherObject){ if(otherObject == null){ throw new NullPointerException(); } if(!(otherObject instanceof HashResult)){ return false; } HashResult otherHash = (HashResult) otherObject; if(type != otherHash.type){ return false; } for(int i = 0; i < result.length; i++){ if(result[i] != otherHash.result[i]) return false; } return true; }

Target:
public boolean equals(Object otherObject){ if(!(otherObject instanceof HashResult)){ return false; } HashResult otherHash = (HashResult) otherObject; if(type != otherHash.type){ return false; } return MessageDigest.isEqual(result, otherHash.result); }
Source:
private JTest(Builder builder) { this.id = builder.id; this.testDescription = builder.jTestDescription; this.requestsPerSecond = builder.requestsPerSecond; this.maxLoadThreads = builder.maxLoadThreads; this.warmUpTimeInSeconds = builder.warmUpTimeInSeconds; this.terminationType = builder.terminationType; this.durationInSeconds = builder.durationInSeconds; this.iterationCount = builder.iterationCount; this.maxDurationInSeconds = builder.maxDurationInSeconds; }

Target:
private JTest(Builder builder) { this.id = builder.id; this.testDescription = builder.jTestDescription; this.load = builder.load; this.termination = builder.termination; }
Source:
private static boolean hasClasses(String ...classNames) { for (String className : classNames) { try { Class.forName(className, false, ScopeFactory.class.getClassLoader()); } catch (Throwable t) { return false; } } return true; }

Target:
private static boolean hasClasses(String... classNames) { for (String className : classNames) { try { Class.forName(className, false, ScopeFactory.class.getClassLoader()); } catch (ClassNotFoundException t) { return false; } } return true; }
Source:
public void render(Context context, GlusterVolumeEntity volume, SafeHtmlBuilder sb) { int brickCount = volume.getBricks().size(); if (volume == null) { return; } int count = 0; GlusterStatus status = volume.getStatus(); ImageResource statusImage = null; String tooltip; switch (status) { case DOWN: statusImage = resources.downImage(); tooltip = constants.down(); break; case UP: count = countDownBricks(volume); if(count == 0){ statusImage = resources.upImage(); tooltip = constants.up(); }else { statusImage = resources.volumeUpWarning(); if(count < brickCount) { tooltip = constants.volumeBricksDown(); } else { tooltip = constants.allBricksDown(); } } break; default: statusImage = resources.downImage(); tooltip = constants.down(); } ImageResource alertImage = resources.alertImage(); SafeHtml statusImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML()); SafeHtml alertImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(alertImage).getHTML()); if(count == brickCount) { sb.append(applicationTemplates.statusWithAlertTemplate(statusImageHtml, alertImageHtml, tooltip)); } else { sb.append(applicationTemplates.statusTemplate(statusImageHtml, tooltip)); } }

Target:
public void render(Context context, GlusterVolumeEntity volume, SafeHtmlBuilder sb) { if (volume == null) { return; } int brickCount = volume.getBricks().size(); int count = 0; GlusterStatus status = volume.getStatus(); ImageResource statusImage = null; String tooltip; switch (status) { case DOWN: statusImage = resources.downImage(); tooltip = constants.down(); break; case UP: count = countDownBricks(volume); if(count == 0){ statusImage = resources.upImage(); tooltip = constants.up(); }else { statusImage = resources.volumeUpWarning(); if(count < brickCount) { tooltip = constants.volumeBricksDown(); } else { tooltip = constants.volumeAllBricksDown(); } } break; default: statusImage = resources.downImage(); tooltip = constants.down(); } ImageResource alertImage = resources.alertImage(); SafeHtml statusImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML()); SafeHtml alertImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(alertImage).getHTML()); if(count == brickCount) { sb.append(applicationTemplates.statusWithAlertTemplate(statusImageHtml, alertImageHtml, tooltip)); } else { sb.append(applicationTemplates.statusTemplate(statusImageHtml, tooltip)); } }
Source:
protected VdcActionParametersBase getParametersForTask(VdcActionType actionType, VdcActionParametersBase parameters) { VdcActionType parentCommandType = getParentCommand(actionType); VdcActionParametersBase parentParameters = null; if (isParentCoCoChild()) { if (getTaskType() == AsyncTaskType.notSupported) { parentParameters = getParameters().getParentParameters(); } } else { if (parentHasCallback()) { if (getTaskType() == AsyncTaskType.notSupported) { parentParameters = getParameters().getParentParameters(); } } else { parentParameters = getParameters().getParentParameters(); } } if (parentCommandType == VdcActionType.Unknown || parentParameters == null) { return parameters; } parentParameters.setExecutionReason(parameters.getExecutionReason()); parentParameters.setCommandType(parentCommandType); return parentParameters; }

Target:
protected VdcActionParametersBase getParametersForTask(VdcActionType actionType, VdcActionParametersBase parameters) { VdcActionType parentCommandType = getParentCommand(actionType); VdcActionParametersBase parentParameters = null; if (parentHasCallback()) { if (getTaskType() == AsyncTaskType.notSupported) { parentParameters = getParameters().getParentParameters(); } } else { parentParameters = getParameters().getParentParameters(); } if (parentCommandType == VdcActionType.Unknown || parentParameters == null) { return parameters; } parentParameters.setExecutionReason(parameters.getExecutionReason()); parentParameters.setCommandType(parentCommandType); return parentParameters; }
Source:
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof DirectoryItem) { DirectoryItem dOther = (DirectoryItem)other; return dOther.getCategory().equals(category) && dOther.getItem().equals(item); } return false; }

Target:
@Override public boolean equals(Object other) { if (this == other) { return true; } else if (other instanceof DirectoryItem) { DirectoryItem dOther = (DirectoryItem) other; return dOther.getCategory().equals(category) && dOther.getItem().equals(item); } else { return false; } }
Source:
public boolean updateQueryWithJson(final String json) throws ServiceException { NettyClientBase client = connection.getTajoMasterConnection(); connection.checkSessionAndGet(client); TajoMasterClientProtocolService.BlockingInterface tajoMasterService = client.getStub(); QueryRequest.Builder builder = QueryRequest.newBuilder(); builder.setSessionId(connection.sessionId); builder.setQuery(json); builder.setIsJson(true); ClientProtos.UpdateQueryResponse response = tajoMasterService.updateQuery(null, builder.build()); if (response.getResultCode() == ClientProtos.ResultCode.OK) { return true; } else { if (response.hasErrorMessage()) { System.err.println("ERROR: " + response.getErrorMessage()); } return false; } }

Target:
public boolean updateQueryWithJson(final String json) throws ServiceException { NettyClientBase client = connection.getTajoMasterConnection(); connection.checkSessionAndGet(client); TajoMasterClientProtocolService.BlockingInterface tajoMasterService = client.getStub(); QueryRequest.Builder builder = QueryRequest.newBuilder(); builder.setSessionId(connection.sessionId); builder.setQuery(json); builder.setIsJson(true); ClientProtos.UpdateQueryResponse response = tajoMasterService.updateQuery(null, builder.build()); if (response.getResultCode() == ClientProtos.ResultCode.OK) { return true; } else { if (response.hasErrorMessage()) { LOG.error("ERROR: " + response.getErrorMessage()); } return false; } }
Source:
void threeHitsAgainstTwoMultiHpPlanesKillsOneAndDamagesTheOther() { whenGetRandom(bridge).thenAnswer(withValues(0, 1, 2)); final CasualtyDetails details = AaCasualtySelector.getAaCasualties( givenMultiHpPlaneUnits(2), givenDamageableAaUnits(1), mock(CombatValue.class), mock(CombatValue.class), "text", givenDiceRoll(true, true, true), bridge, hitPlayer, UUID.randomUUID(), mock(Territory.class)); assertThat("1 Plane is killed", details.getKilled(), hasSize(1)); assertThat( "The killed plane is also damaged and the other plane takes 1 damage", details.getDamaged(), hasSize(2)); }

Target:
void threeHitsAgainstTwoMultiHpPlanesKillsOneAndDamagesTheOther() { whenGetRandom(bridge).thenAnswer(withValues(0, 1, 2)); final CasualtyDetails details = AaCasualtySelector.getAaCasualties( planeMultiHpUnitType.create(2, hitPlayer, true), damageableAaUnitType.create(1, aaPlayer, true), mock(CombatValue.class), mock(CombatValue.class), "text", givenDiceRollWithHitSequence(true, true, true), bridge, hitPlayer, UUID.randomUUID(), mock(Territory.class)); assertThat( "3 hits against 2 planes with 2 hp each is guaranteed to kill one of them", details.getKilled(), hasSize(1)); assertThat( "3 hits against 2 planes with 2 hp each will damage both of them.", details.getDamaged(), hasSize(2)); }
Source:
private void validateNumerics() { if (validationTimeout > connectionTimeout && connectionTimeout != Integer.MAX_VALUE) { validationTimeout = connectionTimeout; } if (minIdle < 0) { minIdle = maxPoolSize; } if (minIdle > maxPoolSize) { maxPoolSize = minIdle; } if (maxLifetime < 0) { LOGGER.error("maxLifetime cannot be negative."); throw new IllegalArgumentException("maxLifetime cannot be negative."); } else if (maxLifetime > 0 && maxLifetime < TimeUnit.SECONDS.toMillis(30)) { LOGGER.warn("maxLifetime is less than 30000ms, setting to default {}ms.", MAX_LIFETIME); maxLifetime = MAX_LIFETIME; } if (idleTimeout != 0 && idleTimeout < TimeUnit.SECONDS.toMillis(10)) { LOGGER.warn("idleTimeout is less than 10000ms, setting to default {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (idleTimeout + TimeUnit.SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) { LOGGER.warn("idleTimeout is close to or greater than maxLifetime, disabling it."); maxLifetime = idleTimeout; idleTimeout = 0; } if (maxLifetime == 0 && idleTimeout == 0) { LOGGER.warn("setting idleTimeout to {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (leakDetectionThreshold != 0 && leakDetectionThreshold < TimeUnit.SECONDS.toMillis(2) && !unitTest) { LOGGER.warn("leakDetectionThreshold is less than 2000ms, setting to minimum 2000ms."); leakDetectionThreshold = 2000L; } }

Target:
private void validateNumerics() { if (validationTimeout > connectionTimeout && connectionTimeout != Integer.MAX_VALUE) { validationTimeout = connectionTimeout; } if (minIdle < 0) { minIdle = maxPoolSize; } else if (minIdle > maxPoolSize) { maxPoolSize = minIdle; } if (maxLifetime < 0) { LOGGER.error("maxLifetime cannot be negative."); throw new IllegalArgumentException("maxLifetime cannot be negative."); } else if (maxLifetime > 0 && maxLifetime < TimeUnit.SECONDS.toMillis(30)) { LOGGER.warn("maxLifetime is less than 30000ms, setting to default {}ms.", MAX_LIFETIME); maxLifetime = MAX_LIFETIME; } if (idleTimeout != 0 && idleTimeout < TimeUnit.SECONDS.toMillis(10)) { LOGGER.warn("idleTimeout is less than 10000ms, setting to default {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (idleTimeout + TimeUnit.SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) { LOGGER.warn("idleTimeout is close to or greater than maxLifetime, disabling it."); maxLifetime = idleTimeout; idleTimeout = 0; } if (maxLifetime == 0 && idleTimeout == 0) { LOGGER.warn("setting idleTimeout to {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (leakDetectionThreshold != 0 && leakDetectionThreshold < TimeUnit.SECONDS.toMillis(2) && !unitTest) { LOGGER.warn("leakDetectionThreshold is less than 2000ms, setting to minimum 2000ms."); leakDetectionThreshold = 2000L; } }
Source:
public String getToolTipText() { return LaunchConfigurationsMessages.LaunchConfigurationsDialog_5; }

Target:
public String getToolTipText() { return LaunchConfigurationsMessages.LaunchConfigurationsDialog_6; }
Source:
public java.lang.Class<?> resolveClass(String name) { String rqpath = ServletRequestsAttr.getCurrentURL(); List<String> packageList = importPackages.get(rqpath); if (packageList == null) { packageList = basicPackage; } if (name == null || name.contains(".")) { return null; } Class<?> result = clazzes.get(name); if (result == null) { for (String p : packageList) { String className = p + '.' + name; Class<?> clazz = findClass(className); if (clazz != null) { if (result != null) { throw new ELException(Util.message(null, "importHandler.ambiguousImport", className, result.getName())); } result = clazz; } } if (result != null) { clazzes.put(name, result); } } return result; }

Target:
public java.lang.Class<?> resolveClass(String name) { String rqpath = ServletRequestsAttr.getCurrentURL(); List<String> packages = importPackages.get(rqpath); if (packages == null) { packages = basicPackage; } if (name == null || name.contains(".")) { return null; } Class<?> result = clazzes.get(name); if (result == null) { for (String p : packages) { String className = p + '.' + name; Class<?> clazz = findClass(className); if (clazz != null) { if (result != null) { throw new ELException(Util.message(null, "importHandler.ambiguousImport", className, result.getName())); } result = clazz; } } if (result != null) { clazzes.put(name, result); } } return result; }
Source:
public String getJourneyJson(final String plan, final String itineraryPoints, final String leaving, final String arriving, final int speed) throws IOException { Response<String> response = v1Api.getJourneyJson(plan, itineraryPoints, leaving, arriving, speed).execute(); return JourneyStringTransformer.INSTANCE.fromV1ApiJson(response.body()); }

Target:
public String getJourneyJson(final String plan, final String itineraryPoints, final String leaving, final String arriving, final int speed) throws IOException { Response<String> response = v1Api.getJourneyJson(plan, itineraryPoints, leaving, arriving, speed).execute(); return JourneyStringTransformerKt.fromV1ApiJson(response.body()); }
Source:
public TestUtils() { File userHome = customUserHome(); if (userHome == null) userHome = FS.DETECTED.userHome(); rootDir = new File(userHome, "egitTest" + System.currentTimeMillis() + "-" + Integer.toHexString(System.identityHashCode(this))); }

Target:
public TestUtils() { File testDir = getCustomTestDirectory(); if (testDir == null) { testDir = FS.DETECTED.userHome(); testDir = new File(testDir, "egit.test.tmpdir"); } rootDir = new File(testDir, "egitTest" + System.currentTimeMillis() + "-" + Integer.toHexString(System.identityHashCode(this))); }
Source:
protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable key, value, qmc, tvp; ArrayBackedValueStorage abvs = abvsPool.takeOne(); ArrayBackedValueStorage abvs1 = abvsPool.takeOne(); try { abvs.reset(); ob.reset(abvs); tvps.clear(); int len = args.length; for (int i = 0; i < len; i += 3) { key = args[i]; value = args[i + 1]; qmc = args[i + 2]; if (!isDuplicateKeys(key, tvps)) { tvps.add(key); key.getValue(sp); if (value.getTag() == ValueTag.SEQUENCE_TAG) { qmc.getValue(bp); value.getValue(seqp); if (seqp.getEntryCount() == 0) { if (bp.getBoolean()) { continue; } XDMConstants.setJsNull(value); ob.addItem(sp, value); } else { abvs1.reset(); ab.reset(abvs1); int l = seqp.getEntryCount(); for (int j = 0; j < l; j++) { seqp.getEntry(j, value); ab.addItem(value); } ab.finish(); vp.set(abvs1); ob.addItem(sp, vp); } } else { ob.addItem(sp, value); } } else { throw new SystemException(ErrorCode.JNDY0003); } } ob.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { abvsPool.giveBack(abvs); abvsPool.giveBack(abvs1); } }

Target:
protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable key, value, qmc, tvp; ArrayBackedValueStorage abvsResult = abvsPool.takeOne(); ArrayBackedValueStorage abvsItem = abvsPool.takeOne(); try { abvsResult.reset(); ob.reset(abvsResult); tvps.clear(); int len = args.length; for (int i = 0; i < len; i += 3) { key = args[i]; value = args[i + 1]; qmc = args[i + 2]; if (!isDuplicateKeys(key, tvps)) { tvps.add(key); key.getValue(sp); if (value.getTag() == ValueTag.SEQUENCE_TAG) { qmc.getValue(bp); value.getValue(seqp); if (seqp.getEntryCount() == 0) { if (bp.getBoolean()) { continue; } XDMConstants.setJsNull(value); ob.addItem(sp, value); } else { abvsItem.reset(); ab.reset(abvsItem); int l = seqp.getEntryCount(); for (int j = 0; j < l; j++) { seqp.getEntry(j, value); ab.addItem(value); } ab.finish(); vp.set(abvsItem); ob.addItem(sp, vp); } } else { ob.addItem(sp, value); } } else { throw new SystemException(ErrorCode.JNDY0003); } } ob.finish(); result.set(abvsResult); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } finally { abvsPool.giveBack(abvsResult); abvsPool.giveBack(abvsItem); } }
Source:
public void deleteAllGrants(final String username, final String password) throws Exception { List<String> grandsId = getAllGrants(username, password); for (String grandId : grandsId) { String url = "<LINK_1>" + grandId; requestFactory .fromUrl(url) .useDeleteMethod() .setAuthorizationHeader(createBasicAuthHeader(username, password)) .request(); } LOG.debug(format("Application grants '%s' were removed from github.com", grandsId)); }

Target:
public void deleteAllGrants(final String username, final String password) throws Exception { List<String> grandsId = getAllGrants(username, password); for (String grandId : grandsId) { String url = "<LINK_1>" + grandId; requestFactory .fromUrl(url) .useDeleteMethod() .setAuthorizationHeader(createBasicAuthHeader(username, password)) .request(); } LOG.debug("Application grants '{}' were removed from github.com", grandsId); }
Source:
public List<Integer> getMemberPartitions(Address target) { List<Integer> ownedPartitions = new ArrayList<>(); for (int i = 0; i < partitionCount; i++) { final Address owner = getPartitionOwner(i); if (target.equals(owner)) { ownedPartitions.add(i); } } return ownedPartitions; }

Target:
public List<Integer> getMemberPartitions(Address target) { List<Integer> ownedPartitions = new LinkedList<>(); for (int i = 0; i < partitionCount; i++) { final Address owner = getPartitionOwner(i); if (target.equals(owner)) { ownedPartitions.add(i); } } return ownedPartitions; }
Source:
private void validateInput() { if (getShell() == null) { return; } String tagNameMessage = tagNameValidator.isValid(tagNameText.getText()); setErrorMessage(tagNameMessage); String tagMessageVal = tagMessageText.getText().trim(); boolean isLightWeight = lightweightButton.getSelection(); Control button = getButton(IDialogConstants.OK_ID); if (button != null) { boolean containsTagNameAndMessage = (tagNameMessage == null || tagMessageVal .length() == 0) && tagMessageVal.length() != 0; boolean shouldOverwriteTag = (overwriteButton.getSelection() && Repository .isValidRefName(Constants.R_TAGS + tagNameText.getText())); boolean enabled = containsTagNameAndMessage || shouldOverwriteTag || (isLightWeight && tagNameMessage == null && !tagNameText.getText().isEmpty()); button.setEnabled(enabled); Button createTagAndStartPush = getButton(CREATE_AND_START_PUSH_ID); if (createTagAndStartPush != null) createTagAndStartPush.setEnabled(enabled); } boolean existingTagSelected = existingTag != null; if ((existingTagSelected && !overwriteButton.getSelection()) || isLightWeight) { tagMessageText.getTextWidget().setEditable(false); } else tagMessageText.getTextWidget().setEditable(true); overwriteButton.setEnabled(existingTagSelected); if (!existingTagSelected) overwriteButton.setSelection(false); }

Target:
private void validateInput() { if (getShell() == null) { return; } String tagNameMessage = tagNameValidator.isValid(tagNameText.getText()); setErrorMessage(tagNameMessage); String tagMessageVal = tagMessageText.getText().trim(); boolean isLightWeight = lightweightButton.getSelection(); Control button = getButton(IDialogConstants.OK_ID); if (button != null) { boolean containsTagNameAndMessage = (tagNameMessage == null || tagMessageVal .length() == 0) && tagMessageVal.length() != 0; boolean shouldOverwriteTag = (overwriteButton.getSelection() && Repository .isValidRefName(Constants.R_TAGS + tagNameText.getText())); boolean enabled = containsTagNameAndMessage || shouldOverwriteTag || (isLightWeight && tagNameMessage == null && !tagNameText.getText().isEmpty()); button.setEnabled(enabled); Button createTagAndStartPush = getButton(CREATE_AND_START_PUSH_ID); if (createTagAndStartPush != null) createTagAndStartPush.setEnabled(enabled); } boolean existingTagSelected = existingTag != null; boolean editable = (existingTagSelected && !overwriteButton.getSelection()) || isLightWeight; tagMessageText.getTextWidget().setEditable(editable); overwriteButton.setEnabled(existingTagSelected); if (!existingTagSelected) overwriteButton.setSelection(false); }
Source:
public void javaToNative(Object object, TransferData transferData) { if (!checkMyType(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); } ArrayList<CapraOfficeObject> officeObjects = (ArrayList<CapraOfficeObject>) object; try (ByteArrayOutputStream out = new ByteArrayOutputStream(); DataOutputStream writeOut = new DataOutputStream(out)) { for (int i = 0; i < officeObjects.size(); i++) { CapraOfficeObject currOfficeObject = officeObjects.get(i); byte[] buffer = currOfficeObject.getData().getBytes(); writeOut.writeInt(buffer.length); writeOut.write(buffer); buffer = currOfficeObject.getUri().getBytes(); writeOut.writeInt(buffer.length); writeOut.write(buffer); } byte[] bufferOut = out.toByteArray(); super.javaToNative(bufferOut, transferData); } catch (IOException e) { } }

Target:
public void javaToNative(Object object, TransferData transferData) { if (!checkMyType(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); } ArrayList<CapraOfficeObject> officeObjects = (ArrayList<CapraOfficeObject>) object; try (ByteArrayOutputStream out = new ByteArrayOutputStream(); DataOutputStream writeOut = new DataOutputStream(out)) { for (int i = 0; i < officeObjects.size(); i++) { CapraOfficeObject currOfficeObject = officeObjects.get(i); byte[] buffer = currOfficeObject.getData().getBytes(); writeOut.writeInt(buffer.length); writeOut.write(buffer); buffer = currOfficeObject.getUri().getBytes(); writeOut.writeInt(buffer.length); writeOut.write(buffer); } byte[] bufferOut = out.toByteArray(); super.javaToNative(bufferOut, transferData); } catch (IOException e) { e.printStackTrace(); } }
Source:
public String toString() { return "CloudObjectLocation {" + "bucket=" + bucket + ",path=" + path + "}"; }

Target:
public String toString() { return "CloudObjectLocation{" + "bucket='" + bucket + '\'' + ", path='" + path + '\'' + '}'; }
Source:
public List<String> getQueries() throws Exception { List<String> queries = new ArrayList<>(); queries.add(getClearTableQuery()); if (log.isDebugEnabled()) { log.debug("Generated SQL queries to clear table:"); for (String q : queries) { log.debug(q); } } return queries; }

Target:
public List<String> getQueries() throws Exception { List<String> queries = new ArrayList<>(); queries.add(getClearTableQuery()); if (LOG.isDebugEnabled()) { LOG.debug("Generated SQL queries to clear table:"); for (String q : queries) { LOG.debug(q); } } return queries; }