private to protected to solve http://issues.spockframework.org/detail?id=151
184334
private int determineVisibilityForSharedFieldAccessor(Field field) {
    if (field.getOwner() == null) { // true field
      int visibility = AstUtil.getVisibility(field.getAst());
      if (visibility == Opcodes.ACC_PRIVATE) visibility = Opcodes.ACC_PROTECTED;
      return visibility;
    } else { // property
      return Opcodes.ACC_PUBLIC;
    }
  }
155986
def method_missing(method_sym, *args, &block) # rubocop:disable Style/MethodMissingSuper
      return nil.__send__(method_sym, *args, &block) if nil.respond_to?(method_sym)

      self
    end
250792
public static void main(String[] args) throws LoginFailedException,
			IOException, MediaWikiApiErrorException {
		ExampleHelpers.configureLogging();
		printDocumentation();

		SetLabelsForNumbersBot bot = new SetLabelsForNumbersBot();
		ExampleHelpers.processEntitiesFromWikidataDump(bot);
		bot.finish();

		System.out.println("*** Done.");
	}
579207
private void fix() {
        Set<String> nodeGroups = appContext.getTaskTrackerManager().getNodeGroups();
        if (CollectionUtils.isEmpty(nodeGroups)) {
            return;
        }
        for (String nodeGroup : nodeGroups) {
            List<JobPo> deadJobPo = appContext.getExecutableJobQueue().getDeadJob(nodeGroup, SystemClock.now() - MAX_TIME_OUT);
            if (CollectionUtils.isNotEmpty(deadJobPo)) {
                for (JobPo jobPo : deadJobPo) {
                    appContext.getExecutableJobQueue().resume(jobPo);
                    LOGGER.info("Fix executable job : {} ", JSON.toJSONString(jobPo));
                }
            }
        }
    }
615333
public String enable(String spaceKey) throws GreenPepperServerException {
        try {
            if (!isServerReady()) {
                return getText(SERVER_NOCONFIGURATION);
            }

            /* BEGIN : COMMENT THIS FOR DEPLOYING TO GPS */
            if (isCommercialLicense()) {
                final User activeUser = getRemoteUser();

                if (activeUser == null) {
                    return getText(ANONYMOUS_ACCESS_DENIED);
                }

                if (!getGreenPepperUserGroup().hasMembership(activeUser)) {
                    return getText(USER_NOTMEMBEROF_GREENPEPPERUSERS_GROUP);
                }
            }
            /* END : COMMENT THIS FOR DEPLOYING TO GPS */

            Repository repository = getHomeRepository(spaceKey);
            getGPServerService().getRegisteredRepository(repository);
            return null;
        } catch (GreenPepperServerException e) {
            log.info(e.getMessage());
            return getText(e.getId());
        }
    }
921532
private void showErrorIconHax(Drawable icon) {
        if (icon == null)
            return;

        // only for JB 4.2 and 4.2.1
        if (android.os.Build.VERSION.SDK_INT != Build.VERSION_CODES.JELLY_BEAN
                && android.os.Build.VERSION.SDK_INT != Build.VERSION_CODES.JELLY_BEAN_MR1)
            return;

        try {
            Class<?> textview = Class.forName("android.widget.TextView");
            Field tEditor = textview.getDeclaredField("mEditor");
            tEditor.setAccessible(true);
            Class<?> editor = Class.forName("android.widget.Editor");
            Method privateShowError = editor.getDeclaredMethod("setErrorIcon",
                    Drawable.class);
            privateShowError.setAccessible(true);
            privateShowError.invoke(tEditor.get(this), icon);
        } catch (Exception e) {
            // e.printStackTrace(); // oh well, we tried
        }
    }
1228353
void poll_attr(final WorkItem to_do) throws DevFailed {
	Util.out5.println("----------> Time = " + now.tv_sec + "," + now.tv_usec + " Dev name = "
		+ to_do.dev.get_name() + ", Attr name = " + to_do.name);

	final TimeVal before_cmd = new TimeVal();
	final TimeVal after_cmd = new TimeVal();
	TimeVal needed_time;
	AttributeValue[] argout;
	// vector<PollObj *>::iterator ite = NULL;
	try {

	    long ctm = System.currentTimeMillis();
	    before_cmd.tv_sec = (int) (ctm / 1000);
	    before_cmd.tv_usec = (int) (ctm - 1000 * before_cmd.tv_sec) * 1000;
	    before_cmd.tv_sec = before_cmd.tv_sec - Tango_DELTA_T;

	    // Read the attributes
	    attr_names[0] = to_do.name;
	    argout = to_do.dev.read_attributes(attr_names);

	    ctm = System.currentTimeMillis();
	    after_cmd.tv_sec = (int) (ctm / 1000);
	    after_cmd.tv_usec = (int) (ctm - 1000 * after_cmd.tv_sec) * 1000;
	    after_cmd.tv_sec = after_cmd.tv_sec - Tango_DELTA_T;

	    needed_time = time_diff(before_cmd, after_cmd);

	    // Insert only if update period > 0
	    to_do.dev.get_dev_monitor().get_monitor();
	    final PollObj poll_obj = to_do.dev.get_polled_obj_by_type_name(to_do.type, to_do.name);
	    if (poll_obj.get_upd() > 0) {
		poll_obj.insert_data(argout[0], before_cmd, needed_time);
	    }
	    to_do.dev.get_dev_monitor().rel_monitor();
	} catch (final DevFailed e) {
	    Except.print_exception(e);

	    final long ctm = System.currentTimeMillis();
	    after_cmd.tv_sec = (int) (ctm / 1000);
	    after_cmd.tv_usec = (int) (ctm - 1000 * after_cmd.tv_sec) * 1000;
	    after_cmd.tv_sec = after_cmd.tv_sec - Tango_DELTA_T;

	    needed_time = time_diff(before_cmd, after_cmd);

	    // to_do.dev.get_dev_monitor().get_monitor();
	    try {
		final PollObj poll_obj = to_do.dev.get_polled_obj_by_type_name(to_do.type,
			to_do.name);
		poll_obj.insert_except(e, before_cmd, needed_time);
	    } catch (final DevFailed ex) {
	    }
	    to_do.dev.get_dev_monitor().rel_monitor();
	}
    }
177866
public void contributeToModule() {
		final GuiceModuleAccess module = this.module.get();
		if (!this.removableBindings.isEmpty()) {
			// Ok, we are broking the Java secutiry manager.
			// But it's for having something working!
			try {
				final Field field = module.getClass().getDeclaredField("bindings"); //$NON-NLS-1$
				final boolean accessible = field.isAccessible();
				try {
					field.setAccessible(true);
					final Collection<?> hiddenBindings = (Collection<?>) field.get(module);
					hiddenBindings.removeAll(this.removableBindings);
				} finally {
					field.setAccessible(accessible);
				}
			} catch (Exception exception) {
				throw new IllegalStateException(exception);
			}
		}
		module.addAll(this.bindings);
	}
880488
function (e) {


/*Line 52 - 'AtomPostButton.js' */                if (!this._postUrl) {
/*Line 53 - 'AtomPostButton.js' */                    base.onClickHandler.apply(this, arguments);
/*Line 54 - 'AtomPostButton.js' */                    return;
/*Line 55 - 'AtomPostButton.js' */                }

/*Line 57 - 'AtomPostButton.js' */                var vr = this._validationRoot;
/*Line 58 - 'AtomPostButton.js' */                if (vr) {
/*Line 59 - 'AtomPostButton.js' */                    vr.validate();
/*Line 60 - 'AtomPostButton.js' */                    var errors = vr.get_errors();
/*Line 61 - 'AtomPostButton.js' */                    if (errors.length) {
/*Line 62 - 'AtomPostButton.js' */                        Atom.alert(Atom.mapJoin(errors,'label'));
/*Line 63 - 'AtomPostButton.js' */                        return false;
/*Line 64 - 'AtomPostButton.js' */                    }
/*Line 65 - 'AtomPostButton.js' */                }


/*Line 68 - 'AtomPostButton.js' */                var errors = this.get_errors();
/*Line 69 - 'AtomPostButton.js' */                if (errors.length) {

/*Line 71 - 'AtomPostButton.js' */                    Atom.alert(Atom.mapJoin(errors, 'label'));

/*Line 73 - 'AtomPostButton.js' */                    return false;
/*Line 74 - 'AtomPostButton.js' */                }


/*Line 77 - 'AtomPostButton.js' */                var data = this.get_postData();

/*Line 79 - 'AtomPostButton.js' */                if (data === null || data === undefined)
/*Line 80 - 'AtomPostButton.js' */                    return;

/*Line 82 - 'AtomPostButton.js' */                var m = this._mergeData;
/*Line 83 - 'AtomPostButton.js' */                if (m) {
/*Line 84 - 'AtomPostButton.js' */                    for (var i in m) {
/*Line 85 - 'AtomPostButton.js' */                        data[i] = m[i];
/*Line 86 - 'AtomPostButton.js' */                    }
/*Line 87 - 'AtomPostButton.js' */                }

/*Line 89 - 'AtomPostButton.js' */                //data = AtomBinder.getClone(data);

/*Line 91 - 'AtomPostButton.js' */                var caller = this;
/*Line 92 - 'AtomPostButton.js' */                var invokeNext = function (p) {
/*Line 93 - 'AtomPostButton.js' */                    AtomBinder.setValue(caller, "postResult", p.value());
/*Line 94 - 'AtomPostButton.js' */                    caller.invokeAction(caller._next);
/*Line 95 - 'AtomPostButton.js' */                };

/*Line 97 - 'AtomPostButton.js' */                //this.invokeAjax(this._postUrl, { type: "POST", data: data, success: invokeNext });


/*Line 100 - 'AtomPostButton.js' */                var p = AtomPromise.json(this._postUrl, null, { type: "POST", data: data });
/*Line 101 - 'AtomPostButton.js' */                p.then(invokeNext);

/*Line 103 - 'AtomPostButton.js' */                var errorNext = this._errorNext;
/*Line 104 - 'AtomPostButton.js' */                if (errorNext) {
/*Line 105 - 'AtomPostButton.js' */                    p.failed(function (pr) {
/*Line 106 - 'AtomPostButton.js' */                        AtomBinder.setValue(caller, "postError", pr);
/*Line 107 - 'AtomPostButton.js' */                        caller.invokeAction(caller, errorNext);
/*Line 108 - 'AtomPostButton.js' */                    });
/*Line 109 - 'AtomPostButton.js' */                }

/*Line 111 - 'AtomPostButton.js' */                p.invoke();

/*Line 113 - 'AtomPostButton.js' */            }
358022
@Fix(org.eclipse.xtext.xbase.validation.IssueCodes.VARIABLE_NAME_DISCOURAGED)
	public void fixDiscouragedFieldName(final Issue issue, IssueResolutionAcceptor acceptor) {
		MemberRemoveModification.accept(this, issue, acceptor);
	}
702717
@Fix(io.sarl.lang.validation.IssueCodes.USED_RESERVED_SARL_ANNOTATION)
	public void fixDiscouragedAnnotationUse(final Issue issue, IssueResolutionAcceptor acceptor) {
		AnnotationRemoveModification.accept(this, issue, acceptor);
	}
87075
def start_accepting_passive_host_checks(self):
        
        # todo: #783 create a dedicated brok for global parameters
        if not self.my_conf.accept_passive_host_checks:
            self.my_conf.modified_attributes |= DICT_MODATTR["MODATTR_PASSIVE_CHECKS_ENABLED"].value
            self.my_conf.accept_passive_host_checks = True
            self.my_conf.explode_global_conf()
            self.daemon.update_program_status()
1367191
def respond_to_missing?(name, include_private = false)
      known_action?(name) ||
        known_resource?(name) ||
        known_exception?(name) ||
        super
    end
709571
@RequirePOST
    public HttpResponse doDoWipeOutWorkspace() throws IOException, ServletException, InterruptedException {
        checkPermission(Functions.isWipeOutPermissionEnabled() ? WIPEOUT : BUILD);
        R b = getSomeBuildWithWorkspace();
        FilePath ws = b!=null ? b.getWorkspace() : null;
        if (ws!=null && getScm().processWorkspaceBeforeDeletion(this, ws, b.getBuiltOn())) {
            ws.deleteRecursive();
            for (WorkspaceListener wl : WorkspaceListener.all()) {
                wl.afterDelete(this);
            }
            return new HttpRedirect(".");
        } else {
            // If we get here, that means the SCM blocked the workspace deletion.
            return new ForwardToView(this,"wipeOutWorkspaceBlocked.jelly");
        }
    }
1041323
def error(args):
    
    p = OptionParser(error.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 2:
        sys.exit(not p.print_help())

    version, backup_folder = args
    mkdir(backup_folder)

    fw = open("errors.log", "w")

    seen = set()
    for g in glob("../5-consensus/*.err"):
        if "partitioned" in g:
            continue

        fp = open(g)
        partID = op.basename(g).rsplit(".err", 1)[0]
        partID = int(partID.split("_")[-1])

        for row in fp:
            if row.startswith(working):
                unitigID = row.split("(")[0].split()[-1]
                continue

            if not failed.upper() in row.upper():
                continue

            uu = (version, partID, unitigID)
            if uu in seen:
                continue
            seen.add(uu)

            print("\t".join(str(x) for x in (partID, unitigID)), file=fw)

            s = [str(x) for x in uu]
            unitigfile = pull(s)
            cmd = "mv {0} {1}".format(unitigfile, backup_folder)
            sh(cmd)

        fp.close()

    logging.debug("A total of {0} unitigs saved to {1}.".\
                 format(len(seen), backup_folder))
1120368
public static DockableState fixVLDockingBug(DockingDesktop dockingDesktop, Dockable dockable) {

        Assert.notNull(dockingDesktop, "dockingDesktop");
        Assert.notNull(dockable, "dockable");

        final DockingContext dockingContext = dockingDesktop.getContext();
        final DockKey dockKey = dockable.getDockKey();

        DockableState dockableState = dockingDesktop.getDockableState(dockable);

        final Boolean thisFixApplies = (dockingContext.getDockableByKey(dockKey.getKey()) != null);
        if ((thisFixApplies) && (dockableState == null)) {
            dockingDesktop.registerDockable(dockable);
            dockableState = dockingDesktop.getDockableState(dockable);
//            dockKey.setLocation(dockableState.getLocation());

            Assert.notNull(dockableState, "dockableState");
        }

        return dockableState;
    }
76281
def reply_privately(*strings)
      private_source = source.clone
      private_source.private_message!
      @robot.send_messages(private_source, *strings)
    end