Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
33
37
content
stringlengths
47
206k
api-misuse-repair-complete_data_1
@Override public void processJSONResponse(JSONObject synchronizationResponse) { JSONArray results; long maxCallId = 0; try { results = synchronizationResponse.getJSONArray("results"); for (int i = 0; i < results.length(); i++) { if (results.getJSONObject(i).getBoolean("status")) { maxCallId = results.getJSONObject(i).g...
api-misuse-repair-complete_data_2
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Window window = getWindow(); prepareForApp(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.setStatusBarColor(GetAppColor.getInstance().getAppColor(this)); window.setNavigationBarColor(GetAppColor.ge...
api-misuse-repair-complete_data_3
public final Answer getData() { Answer result = null; try { HttpClient client = new DefaultHttpClient(); HttpRequestBase request = this.getRequest(); String address = config.getAddress(); address = address.concat(address.charAt(address.length() - 1) == '/' ? SUFFIX + this.CMD : "/api/v1/" + this.CMD); request.setURI(ne...
api-misuse-repair-complete_data_4
public boolean addStudent(Student s) { int spot = this.getEmptySpot(); if (spot != -1) { students[spot] = s.getId(); currentEnrollment++; return true; } return false; } public boolean addStudent(Student s) { int spot = this.getEmptySpot(); if (spot != -1) { students[spot] = s.getID(); currentEnrollment++; return true...
api-misuse-repair-complete_data_5
@Override public boolean next() throws SQLException { if (maxRows > 0) { if (currentRow >= maxRows) { return false; } } currentRow++; if (resultCursorPreIterated) { resultCursorPreIterated = false; return !resultCursor.atEnd(); } else { return resultCursor.next(); } } @Override public boolean next() throws SQLExcepti...
api-misuse-repair-complete_data_6
private void createDataList(PixelMap map) throws BrokenImage { this.map = map; mas = map.getPixels(); changeImage(); tess4J.processImage(xLine, yLine, map, img, dirName); Pixel zeroPixel = tess4J.getZeroPixel(); List<Pixel> pixelTimeList = new ArrayList<>(); for (int i = yLine; i < map.getWidth() - 10; ++i) { boolean o...
api-misuse-repair-complete_data_7
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Mapbox.getInstance(this, getString(R.string.access_token)); setContentView(R.layout.activity_annotation_animated_marker); mapView = (MapView) findViewById(R.id.mapView); mapView.onCreate(savedInstanceState); mapView.getMa...
api-misuse-repair-complete_data_8
@Override public void preStart() { cluster.subscribe(getSelf(), MemberUp.class); context().system().actorOf(ClusterSingletonManager.props(Props.create(VideoStorageCoordinator.class), new PoisonPill(), settings), "video-storage-coordinator"); context().system().actorOf(ClusterSingletonProxy.props("/user/video-storage-co...
api-misuse-repair-complete_data_9
@Override public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { final String headerTitle = (String) getGroup(groupPosition); if (convertView == null) { LayoutInflater inflater = (LayoutInflater) this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); convert...
api-misuse-repair-complete_data_10
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_response); Intent intent = getIntent(); String message = intent.getStringExtra(SubmitListener.EXTRA_MESSAGE); result = (TextView) findViewById(R.id.result); result.setText(message); return...
api-misuse-repair-complete_data_11
public void checkInOutStudents(boolean in) { String inOrOut = "out"; if (in) inOrOut = "in"; Calendar cal = Calendar.getInstance(); ListView lv = (ListView) findViewById(R.id.student_list); SparseBooleanArray checked = lv.getCheckedItemPositions(); long time = cal.getTimeInMillis(); int countSuccessful = 0; for (int i ...
api-misuse-repair-complete_data_12
public static void main(String[] args) { String ipDir = args[0]; String indexDir = args[1]; File ipDirectory = new File(ipDir); String[] catDirectories = ipDirectory.list(); String[] files; File dir; Document d = null; IndexWriter writer = new IndexWriter(indexDir); try { for (String cat : catDirectories) { dir = new F...
api-misuse-repair-complete_data_13
public static String getStringFromGrammarStringLiteral(String literal) { StringBuilder buf = new StringBuilder(); int i = 1; int n = literal.length() - 1; while (i < n) { int end = i + 1; if (literal.charAt(i) == '\\') { end = i + 2; if (i + 1 < n && literal.charAt(i + 1) == 'u') { if (i + 2 < n && literal.charAt(i + 2...
api-misuse-repair-complete_data_14
@RequestMapping("/show") public String show(Model model, HttpServletRequest request) throws ParseException { request.getSession().setAttribute(Constants.SEESION_LINK, "schedule_show"); String beginDate = request.getParameter("beginDate"); String endDate = request.getParameter("endDate"); if (CommonUtils.isEmpty(beginDa...
api-misuse-repair-complete_data_15
@Override protected HashMap<String, String> doInBackground(String... arg0) { JSONParser json = new JSONParser(); try { String jsonData = json.getJSONFromUrl("http://www.smilyo.com/app/menu_item.php"); JSONObject jObj = new JSONObject(jsonData); map.put("title", jObj.getString("title")); map.put("URL", jObj.getString("U...
api-misuse-repair-complete_data_16
private WriteResult execute(DBObject condition) { List ids = null; if (!dao.getListenerList().isEmpty()) { ids = dao.getCollection().distinct(Operator.ID, condition); } WriteResult wr = dao.getCollection().update(condition, modifier, false, true); if (!dao.getListenerList().isEmpty() && ids != null) { DBObject in = new...
api-misuse-repair-complete_data_17
@Override public boolean isType(final NodeType checked) { return type.equals(checked); } @Override public boolean isType(final NodeType checked) { return type == checked; }
api-misuse-repair-complete_data_18
public User find(String login) { Query query = em.createQuery("SELECT user FROM User user WHERE user.login = :login"); query.setParameter("login", login); User user = null; try { query.getSingleResult(); } catch (NullPointerException e) { } return user; } public User find(String login) { TypedQuery<User> query = em.c...
api-misuse-repair-complete_data_19
public static void main(String[] args) { int tranType = 0; double accBal = 0, amount = 0, finalBal = 0; String output = ""; accBal = Double.parseDouble(JOptionPane.showInputDialog("Current Account Balance: ")); tranType = Integer.parseInt(JOptionPane.showInputDialog("Choose a transaction type (0: Deposit, 1: Withdraw):...
api-misuse-repair-complete_data_20
@Override public void configure(HttpSecurity http) throws Exception { http.formLogin().loginPage("/login").and().logout().logoutSuccessUrl("/").and().authorizeRequests().mvcMatchers("/brouwers/toevoegen").hasAuthority(ADMINISTRATOR).mvcMatchers("/brouwers/brouwers", "/brouwers/beginnaam", "/brouwers/opalfabet").hasAnyA...
api-misuse-repair-complete_data_21
@Override public void setDataEncoding(DataEncoding dataEncoding) { super.setDataEncoding(dataEncoding); writer.setDataEncoding(dataEncoding); } @Override public void setDataEncoding(DataEncoding dataEncoding) { writer.setDataEncoding(dataEncoding); super.dataEncoding = writer.getDataEncoding(); }
api-misuse-repair-complete_data_22
void initializeAllDevices() { this.driveSystem = new MecanumDriveSystem(hardwareMap, telemetry); this.imuSystem = new IMUSystem(this.hardwareMap, telemetry); this.lineFollowingSystem = new LineFollowingSystem(); } void initializeAllDevices() { this.driveSystem = new MecanumDriveSystem(this); this.imuSystem = new IMUS...
api-misuse-repair-complete_data_23
public static void main(String[] args) { JFrame frame = new JFrame("Survive"); frame.setVisible(true); frame.setSize(1920, 1080); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); hero CurrentUser = new hero(); ArrayList<Button> Buttons = new ArrayList<Button>(); Buttons.add(new Button(1800, 20, 50, 30, "pause", tr...
api-misuse-repair-complete_data_24
private WorkDuration subtractNeverNegative(WorkDuration workDuration, WorkDuration toSubtractWith) { WorkDuration result = workDuration.subtract(toSubtractWith); if (result.toSeconds() > 0) { return result; } return workDurationFactory.createFromWorkingLong(0L); } @CheckForNull private WorkDuration subtractNeverNegat...
api-misuse-repair-complete_data_25
public void startServer(IConfig config, List<? extends InterceptHandler> handlers, ISslContextCreator sslCtxCreator) throws IOException { if (handlers == null) { handlers = Collections.emptyList(); } final String handlerProp = System.getProperty("intercept.handler"); if (handlerProp != null) { config.setProperty("inter...
api-misuse-repair-complete_data_26
private void setupActionBar() { getActionBar().setDisplayHomeAsUpEnabled(true); } private void setupActionBar() { getSupportActionBar().setDisplayHomeAsUpEnabled(true); }
api-misuse-repair-complete_data_27
private void updateCachedIssue(Issue issue) { TurboIssue newCached = new TurboIssue(issue); int index = getIndexOfIssue(issue.getNumber()); if (index != -1) { issues.set(index, newCached); } else { issues.add(0, newCached); } } private void updateCachedIssue(Issue issue) { TurboIssue newCached = new TurboIssue(issue)...
api-misuse-repair-complete_data_28
@Override public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { Content c = this.getContent(); String resultStr = offs > 0 ? c.getString(0, c.length() - 1) + str : str + c.getString(0, c.length() - 1); if (format(resultStr)) { super.insertString(offs, str, a); } } @Override publ...
api-misuse-repair-complete_data_29
@Override public Node parse(final TokenStream tokenStream) { if (tokenStream.hasOneOf(FIRST_SET)) { final Token separator = tokenStream.next(); return this.getGrammar().getSyntaxTreeFactory().createSentenceMeatConjunction(separator.getConcept()); } return this.parsingTrouble(tokenStream); } @Override public Node pars...
api-misuse-repair-complete_data_30
@RequestMapping("/productstore") @ResponseBody public List<SystemProduct> products(@RequestParam("bname") String bname) { Iterable<SystemProduct> Products; List<SystemProduct> products = new ArrayList<SystemProduct>(); if (bname.equals("zero")) { Products = sprepo.findAll(); for (SystemProduct p : Products) { products....
api-misuse-repair-complete_data_31
@Override public CompoundProperty addDistanceToCompoundFeature(Compound comp) { for (CompoundProperty prop : getAdditionalProperties()) { if (prop instanceof DistanceToProperty && ((DistanceToProperty) prop).getCompound() == comp) return prop; } Double[] d = new Double[getNumCompounds(true)]; for (int i = 0; i < d.leng...
api-misuse-repair-complete_data_32
@PostMapping("/login") public ResultVO login(@RequestBody WxInfo wxInfo, HttpServletResponse response, HttpServletRequest request) { if (StringUtils.isBlank(wxInfo.getCode())) { return ResultUtil.error("empty code"); } try { WxMaJscode2SessionResult session = wxService.getUserService().getSessionInfo(wxInfo.getCode());...
api-misuse-repair-complete_data_33
public static void init(final boolean enableInDevelopmentFeatures, final boolean supplyChests) { GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConstructionTape, 16), "SWS", "S S", "S S", 'S', Items.STICK, 'W', new ItemStack(Blocks.WOOL, 1, 4)); GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.blockConstruc...
api-misuse-repair-complete_data_34
public void calcTangents() { for (int i = 0; i < indices.size(); i += 3) { int i0 = indices.get(i); int i1 = indices.get(i + 1); int i2 = indices.get(i + 2); Vector3f edge1 = positions.get(i1).sub(positions.get(i0)); Vector3f edge2 = positions.get(i2).sub(positions.get(i0)); float deltaU1 = texCoords.get(i1).getX() - t...
api-misuse-repair-complete_data_35
public static List<SourceColumn> getColumns(String source) { List<SourceColumn> columnList; SourceColumn idColumn; switch(source) { case "All": return new LinkedList<>(); case "Service": columnList = new LinkedList<>(); idColumn = new SourceColumn("entityId", "entity_id", String.class, true); columnList.add(idColumn); ...
api-misuse-repair-complete_data_36
public static Jets[] addJet(Jets[] list) { Scanner keyboard = new Scanner(System.in); Jets[] increasedArray = new Jets[list.length + 1]; for (int i = 0; i < list.length; i++) { increasedArray[i] = list[i]; } String nameOfJet; double speed; double range; float price; System.out.println("What would you like to name your ...
api-misuse-repair-complete_data_37
@Override public List<WeixinUser> searchSubscribers(int enterpriseId, CommonSearchCriteria sc) { return weixinDao.searchSubscribers(this.weixinId, sc); } @Override public List<WeixinUser> searchSubscribers(int enterpriseId, CommonSearchCriteria sc) { return weixinDao.searchSubscribers(enterpriseId, sc); }
api-misuse-repair-complete_data_38
public void doWhenGuessed() { if (trueIfCorrectAnswer(getAnswerAsAlternative(theButtonPressed))) { theButtonPressed.setStyle("-fx-background-color: lawngreen"); ImageView theContinentToChange = game.getiAf().get(game.getCurrentTurnNumberArrayIndex()); game.getCurrentPlayerPlaying().getCollectedContinents().add(Continen...
api-misuse-repair-complete_data_39
private String[] extractData() { String[] params = new String[textParam.size()]; for (int i = 0; i < textParam.size(); i++) { if (i == 0 && !textParam.get(i).getText().equals("") && !textParam.get(i).getText().contains("http")) params[0] = "http://" + textParam.get(i).getText(); else params[i] = textParam.get(i).getTex...
api-misuse-repair-complete_data_40
public static synchronized RdfStore getInstance() { return (instance == null ? new RdfStore() : instance); } public static synchronized RdfStore getInstance() { return (instance == null ? instance = new RdfStore() : instance); }
api-misuse-repair-complete_data_41
private void newGame() throws JSONException { try { sqlConnection = DatabaseUtilities.getSQLConnection(); if (DatabaseUtilities.ensureUserExistsInDatabase(sqlConnection, userChallengedId.longValue(), parameter_userChallengedName)) { board.flipTeams(); final JSONObject boardJSON = board.makeJSON(); final String boardJSO...
api-misuse-repair-complete_data_42
public void addPlayer(String player) { if (!playerNames.contains(player)) { if (getCurrentPlayerAge(player) == 999) { playerNames.add(player); } else if (getCurrentPlayerAge(player) <= DataHolder.getInstance().getTarget_age()) { playerNames.add(player); } else if ((getCurrentPlayerAge(player) > DataHolder.getInstance()...
api-misuse-repair-complete_data_43
public void run() { final MetadataCreator metadataCreator = new MetadataCreator(dataset.getAbsolutePath()); final Metadata metadata = metadataCreator.getMetadata(); String outputPath = getOutputPath(); createSnakeYamlFile(metadata, outputPath); IJ.open(outputPath); } public void run() { final MetadataCreator metadata...
api-misuse-repair-complete_data_44
public void sort(InitialChunkProducer producer, Merger merger, Comparator<long[]> comparator, File workingDir, int maxNumberOfOpenFiles, LongOutputWriter output) { maxNumberOfOpenFiles -= 1; try { List<File> chunks = new ArrayList<>(); producer.loadNextChunk(); while (producer.hasNextChunk()) { File chunk = File.create...
api-misuse-repair-complete_data_45
public void setUpEntityMentionBuilding(Properties properties) { this.buildEntityMentions = PropertiesUtils.getBool(properties, "ner.buildEntityMentions", true); if (this.buildEntityMentions) { String entityMentionsPrefix = "ner.entitymentions"; Properties entityMentionsProps = PropertiesUtils.extractPrefixedProperties(...
api-misuse-repair-complete_data_46
private int appendUnfragmentedMessage(final DirectBuffer srcBuffer, final int srcOffset, final int length) { final int frameLength = length + HEADER_LENGTH; final int alignedLength = align(frameLength, FRAME_ALIGNMENT); final int frameOffset = getTailAndAdd(alignedLength); final UnsafeBuffer termBuffer = termBuffer(); ...
api-misuse-repair-complete_data_47
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { HttpSession session = request.getSession(); Profiles user = (Profiles) session.getAttribute("p...
api-misuse-repair-complete_data_48
protected String FetchUrl(String url) { try { final URL u = new URL(url); URLConnection c = u.openConnection(); if (u.getProtocol().equals("https")) { HttpsURLConnection sslconn = (HttpsURLConnection) c; if (override_certname != null && !override_certname.equals("")) { sslconn.setHostnameVerifier(new HostnameVerifier()...
api-misuse-repair-complete_data_49
public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { moving = 1; Input input = gc.getInput(); menu(gc, sbg); barriarsCollision(gc); movingCollision(); if (heroPositionX < -5910) { sbg.enterState(2); } for (int z = 0; z < movingObstacles.size(); z++) { Rectangle obstacle = movingOb...
api-misuse-repair-complete_data_50
public void matInit() { matrixCalPanel.setLayout(null); matrixCalPanel.add(matInputPanel); matrixCalPanel.add(matBtnPanel); matrixCalPanel.add(matResultPanel); matInputPanel.setLayout(null); matInputPanel.setBounds(0, 0, 680, 140); matInputPanel.setBackground(deepGrey); matInputPanel.add(matA); matInputPanel.add(matB);...
api-misuse-repair-complete_data_51
public void print(TextView view) { String s = "YAW: " + Double.toString(yaw) + " PITCH: " + Double.toString(pitch) + " ROLL: " + Double.toString(roll); if (view != null) { view.setText(s); } else { System.out.println(s); } } public void print(TextView view) { String s = "YAW: " + Integer.toString(yaw) + " PITCH: " + ...
api-misuse-repair-complete_data_52
protected void setupHttpServer() throws Exception { _httpServer = new LocalFileServer(); _configUrl = _httpServer.serveDir("/conf", "conf", _localFileServerPort); LOG.info("Started HTTP server from which config for the MesosSupervisor's may be fetched. URL: " + _configUrl); } protected void setupHttpServer() throws E...
api-misuse-repair-complete_data_53
protected void purgeExpired() { if (expirations == null || expirations.isEmpty()) { return; } final Set<Expiration> current = new TreeSet<Expiration>(expirations); logger.info("Checking {} expirations", current.size()); for (final Expiration exp : current) { if (exp == null) { continue; } final ExpirationKey key = exp....
api-misuse-repair-complete_data_54
public String getMovieQuote() { return ""; } public String getMovieQuote() { return EMPTY_STRING; }
api-misuse-repair-complete_data_55
public static String read(StreamSourceChannel channel) throws IOException { final int capacity = 1024; ByteArrayOutputStream os = new ByteArrayOutputStream(capacity); ByteBuffer buf = ByteBuffer.allocate(capacity); while (Channels.readBlocking(channel, buf) != -1) { buf.flip(); os.write(buf.array()); buf.clear(); } ret...
api-misuse-repair-complete_data_56
public static ChangeBlockEvent.Place callBlockPlaceEvent(Event event) { if (!(event instanceof ChangeBlockEvent.Place)) { throw new IllegalArgumentException("Event is not a valid ChangeBlockEventPlace"); } ChangeBlockEvent.Place spongeEvent = (ChangeBlockEvent.Place) event; if (spongeEvent.getCause().first(Player.class...
api-misuse-repair-complete_data_57
public void start() { boolean running = true; experimentAgenda = new ArrayList<Test>(); if (regression) { try { experimentAgenda.addAll(regression()); } catch (TestExecutionException e) { logger.warn("Problems during the regression", e); } } experimentAgenda.addAll(createRandomTests()); if (!dryrun) { if (bootstrap) { ...
api-misuse-repair-complete_data_58
private void tryToMove(int space) { if (!startedMove) { onNotStartedMove(space); } else { onStartedMove(space); } if (finishedMove) { onFinishedMove(); } } private void tryToMove(int space) { if (!startedMove) { if (capturedOnce && presenter.checkCapturePossibility(space)) onNotStartedMove(space); else { if (!capture...
api-misuse-repair-complete_data_59
public static void main(String[] args) { ApplicationContext app = new ClassPathXmlApplicationContext("customer.xml"); CustomerDaoImpl cdi = (CustomerDaoImpl) app.getBean("customerBean"); Customer cust = new Customer(2, "sam", 26); System.out.println("success!"); Customer result = cdi.findById(2); System.out.println(res...
api-misuse-repair-complete_data_60
@Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { File theDir = new File(location); if (!theDir.exists()) { try { FileWriter writer = new FileWriter(theDir); writer.close(); } catch (IOException e) { e.printStackTrace(); } } Player player = null; if (sender instanc...
api-misuse-repair-complete_data_61
public boolean isEmpty() { return (internalList.get(0) == null) ? true : false; } public boolean isEmpty() { return (internalList.size() == 0) ? true : false; }
api-misuse-repair-complete_data_62
public static void replaceAllSpaceCharComic() { File flist = new File("./" + Config.defaultSavePath); for (File f : flist.listFiles()) { if (f.isDirectory() && f.getName().indexOf(' ') != -1) { f.renameTo(new File(f.getParentFile().getPath(), f.getName().replaceAll(" ", ""))); } } } public static void replaceAllSpace...
api-misuse-repair-complete_data_63
public static void main(String[] args) { ConfigurableApplicationContext ctx = SpringApplication.run(Application.class, args); MonitorDataPostProcessor proc = ctx.getBean(MonitorDataPostProcessor.class); Client client = ctx.getBean(Client.class); client.useTube("data.reading"); while (true) { Job job = client.reserve(10...
api-misuse-repair-complete_data_64
public Element invoke(String operationName, Element mesg, Map<String, Object> headers) throws Exception { mesg = WSDLHelper.unwrapMessagePart(mesg); SynchronousInOutHandler rh = new SynchronousInOutHandler(); Exchange exchange = _serviceReference.createExchange(operationName, rh); Message req = exchange.createMessage()...
api-misuse-repair-complete_data_65
public void handleAction(AbstractSyntaxToken syntaxToken, AbstractToken lexicalToken, int phase) { ActionToken actionToken = (ActionToken) syntaxToken; String key = StringUtilsPlus.generateMethodKey(actionToken.getValue(), phase); if (actionMethodMap.containsKey(key)) { ObjectMethod objectMethod = actionMethodMap.get(k...
api-misuse-repair-complete_data_66
private void evalJointBreak() { if (palmJoint != null) { Vector2 v = palmJoint.getReactionForce(1.0f); float len = v.len(); if (len >= 0.45f && enableJointBreaking) { hand_l.body.getWorld().destroyJoint(palmJoint); palmJoint = null; enableJointBreaking = false; } else if (len <= 0.4f) { enableJointBreaking = true; } } ...
api-misuse-repair-complete_data_67
private void processGenerationCandidateMethod(ExecutableElement attributeMethodCandidate) { Name name = attributeMethodCandidate.getSimpleName(); List<? extends VariableElement> parameters = attributeMethodCandidate.getParameters(); if (name.contentEquals(EQUALS_METHOD) && parameters.size() == 1 && parameters.get(0).as...
api-misuse-repair-complete_data_68
@SuppressWarnings({ "unchecked", "rawtypes" }) public static ISearchClient getSearchClient(AuthDescriptor ad) throws Exception { ISearchClient iSearchClient = null; log.info("Check Formal Parameter AuthDescriptor ..."); Assert.notNull(ad, "AuthDescriptor对象为空"); Assert.notNull(ad.getServiceId(), "service_id为空"); String ...
api-misuse-repair-complete_data_69
public static void main(String[] args) { final long start = System.currentTimeMillis(); a12 problem = new a12(); problem.solve(5); System.out.println(System.currentTimeMillis() - start + "ms"); } public static void main(String[] args) { final long start = System.currentTimeMillis(); a12 problem = new a12(); problem.s...
api-misuse-repair-complete_data_70
private void parseColumnOption(final ComponentOption option) { GridComponentColumn column = new GridComponentColumn(option.getAtrributeValue("name")); String fields = option.getAtrributeValue("fields"); if (fields != null) { for (FieldDefinition field : parseFields(fields)) { column.addField(field); } } column.setExpre...
api-misuse-repair-complete_data_71
private void hideCloakedPlayers(EntityLiving entity, EntityLivingBase target) { if (target == null) { return; } ItemStack targetLegs = target.getItemStackFromSlot(EntityEquipmentSlot.LEGS); if (targetLegs == null || targetLegs.getItem() instanceof ItemExosuitArmor) { return; } ItemExosuitArmor leggings = (ItemExosuitAr...
api-misuse-repair-complete_data_72
@Override public BinaryMaterial clone(BinaryMaterial material) { return binaryMaterialDAO.create(material.getTitle(), material.getContentType(), material.getContent(), material); } @Override public BinaryMaterial clone(BinaryMaterial material) { return binaryMaterialController.createBinaryMaterial(material.getTitle()...
api-misuse-repair-complete_data_73
protected void runWithArguments(String[] args) { String estimated = null, reference = null; boolean help = false; for (int i = 0; i < args.length; i++) { if (args[i].equals("-r")) { reference = args[i + 1]; } if (args[i].equals("-e")) { estimated = args[i + 1]; } if (args[i].equals("-o")) { try { out = new PrintStream(...
api-misuse-repair-complete_data_74
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); addressSearch = (EditText) this.findViewById(R.id.addressSearch); searchButton = (Button) this.findViewById(R.id.searchButton); Log.d("ACA", "Button is: " + (searchButton == null ? "NULL" : ...
api-misuse-repair-complete_data_75
@Override public void setProcesses() { addState(new DriveStraightForward(this, 0.2, 4085)); addState(new TurnRight(this, 0.2, 1281)); addState(new RaiseArm(this, 0.5, 215)); addState(new ExtendArm(this, 0.5, 1290)); addState(new LeftGrabber(this, 0.5, 500)); addState(new DriveStraightForward(this, 0.5, 430)); } @Over...
api-misuse-repair-complete_data_76
protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK) { if (requestCode == REQ_CODE_PICK_PICTURE) { ClipData clipData = data.getClipData(); int total = 0; Uri uri = null; if (clipData == null) { uri = data.getData(); total = 1; } else { total = clipData.getItemCoun...
api-misuse-repair-complete_data_77
public Map<String, Object> process(final Map<String, Object> local, final List<String> flowArgs) { HashMap<String, Object> output = Maps.newHashMap(local); SpringStepContext stepContext = new SpringStepContext(flowArgs, local); ExpressionParser parser = new SpelExpressionParser(); for (Assignment that : assignments) { ...
api-misuse-repair-complete_data_78
public void pruneTrees(int height) { for (int i = 0; i < this.nextPopulation.size(); i++) { if (this.nextPopulation.get(i).getRoot().getDepth() <= height) { this.nextPopulation.remove(i); } } } public void pruneTrees(int height) { ArrayList<EcTree> pruned = new ArrayList<EcTree>(); for (int i = 0; i < this.nextPopula...
api-misuse-repair-complete_data_79
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dialog); mProgressBar = (ProgressBar) findViewById(R.id.progressBar); UpdaterDialog = new PanterDialog(DialogActivity.this); mNoUpdate = new PromptDialog(this); ActivityCompat.requestPermi...
api-misuse-repair-complete_data_80
private WebTarget computeTarget() { String serviceUrl = baseUrl; if (method.isAnnotationPresent(Path.class)) { serviceUrl += method.getAnnotation(Path.class).value(); } return client.target(replacePathParams(serviceUrl, method, parameter)); } private WebTarget computeTarget() { String serviceUrl = baseUrl; if (method...
api-misuse-repair-complete_data_81
@Override public void persist(Object entity) { int rs = getDbmDao().insert(entity); throwIfEffectiveCountError("persist", 1, rs); } @Override public <T> void persist(T entity) { int rs = getDbmDao().insert(entity); throwIfEffectiveCountError("persist", 1, rs); }
api-misuse-repair-complete_data_82
public static void main(String[] args) { Scanner in = new Scanner(System.in); int d1 = in.nextInt(); int m1 = in.nextInt(); int y1 = in.nextInt(); int d2 = in.nextInt(); int m2 = in.nextInt(); int y2 = in.nextInt(); int fine = 0; if (d1 == d2 && m1 == m2 && y1 == y2) { fine = 0; } else if (d1 != d2 && m1 == m2 && y1 ==...
api-misuse-repair-complete_data_83
protected void startPortRangeScanClick(final NumberPicker start, final NumberPicker stop, final HostActivity activity, final String ip) { Button startPortRangeScan = (Button) portRangeDialog.findViewById(R.id.startPortRangeScan); startPortRangeScan.setOnClickListener(new View.OnClickListener() { @Override public void o...
api-misuse-repair-complete_data_84
public String convert(int numberToTransform) { if (numberToTransform > 999999999) { throw new IllegalArgumentException("number is > 999999999"); } return executeConversion(numberToTransform); } public String convert(int numberToTransform) { if (numberToTransform > 999999999) { throw new IllegalArgumentException("numb...
api-misuse-repair-complete_data_85
public static boolean isExternalFunctionNameIdentifier(PsiElement e) { if (!psiIsA(e, GoLiteralIdentifier.class)) return false; GoLiteralIdentifier identifier = (GoLiteralIdentifier) e; if (identifier.isQualified()) return false; e = e.getParent(); if (!psiIsA(e, GoLiteralExpression.class)) return false; if (!psiIsA(e....
api-misuse-repair-complete_data_86
protected void sendRequest(JSONArray args, final CallbackContext callbackContext) { Log.i(TAG, "sendRequest called"); try { final RestRequest request = prepareRestRequest(args); final RestClient restClient = getRestClient(); if (restClient == null) { return; } restClient.sendAsync(request, new RestClient.AsyncRequestCa...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
6