region > newPhoneOrFax (programmatic)
349044
@Programmatic
    public PhoneOrFaxNumber newPhoneOrFax(
            final Object owner,
            final CommunicationChannelType type,
            final String number,
            final String description,
            final String notes) {
        final PhoneOrFaxNumber pn = container.newTransientInstance(PhoneOrFaxNumber.class);
        pn.setType(type);
        pn.setPhoneNumber(number);
        owner(pn).setOwner(owner);

        pn.setPurpose(description);
        pn.setNotes(notes);

        container.persistIfNotAlready(pn);
        return pn;
    }
500058
static Node newCallNode(Node callTarget, Node... parameters) {
    boolean isFreeCall = !isGet(callTarget);
    Node call = IR.call(callTarget);
    call.putBooleanProp(Node.FREE_CALL, isFreeCall);
    for (Node parameter : parameters) {
      call.addChildToBack(parameter);
    }
    return call;
  }
224994
public static void newObj(
			Object created,
			String createdClass,
			String callerClass,
			String callerMethod,
			int callerValKind,
			Object caller) {
		System.err.println("newObj("+
				"created="+created+", "+
				"createdClass="+createdClass+", "+
				"callerClass="+callerClass+", "+
				"callerMethod="+callerMethod+", "+
				"callerValKind="+valKindToString(callerValKind)+", "+
				"caller="+caller+", "+
				")");
	}
1290369
private DialogInterface.OnClickListener createRestoreDefaultsListener() {
        return new DialogInterface.OnClickListener() {

            @Override
            public void onClick(final DialogInterface dialog, final int which) {
                restoreDefaults();
            }

        };
    }
1132622
def from_call(cls, call_node):
        """"""
        callcontext = contextmod.CallContext(call_node.args, call_node.keywords)
        return cls(callcontext)
1233678
function addNodeOrPathListenerApi( eventId, jsonPathOrListenerMap, callback ){

    if( isString(jsonPathOrListenerMap) ) {
      addSingleNodeOrPathListener(eventId, jsonPathOrListenerMap, callback);

    } else {
      addMultipleNodeOrPathListeners(eventId, jsonPathOrListenerMap);
    }

    return oboeApi; // chaining
  }
1260942
@NonNull
    private View.OnClickListener createNextButtonListener() {
        return new View.OnClickListener() {

            @Override
            public void onClick(final View v) {
                if (navigationFragment != null) {
                    int currentIndex = navigationFragment.getSelectedNavigationPreferenceIndex();

                    if (currentIndex < navigationFragment.getNavigationPreferenceCount() - 1) {
                        Bundle params = notifyOnNextStep();

                        if (params != null) {
                            navigationFragment.selectNavigationPreference(currentIndex + 1, params);
                        }
                    }
                }
            }

        };
    }
918752
function recomputeCallback(){
  var len = TO_CALL.length;
  CALL_TIMEOUT = null;
  while(len--){
    (TO_CALL.shift() || NOOP).call();
  }

  TO_CALL.added = {};
}
244112
@NonNull
  public SelfT addContactEndPoint(@NonNull EndPoint contactPoint) {
    this.programmaticContactPoints.add(contactPoint);
    return self;
  }
102438
def new_method_call(celf, destination, path, iface, method) :
        ""
        result = dbus.dbus_message_new_method_call \
          (
            (lambda : None, lambda : destination.encode())[destination != None](),
            path.encode(),
            (lambda : None, lambda : iface.encode())[iface != None](),
            method.encode(),
          )
        if result == None :
            raise CallFailed("dbus_message_new_method_call")
        #end if
        return \
            celf(result)
1037112
function mapToProps(_, {
  phone: {
    brand,
    callLogger,
    callMonitor,
    locale,
    regionSettings,
    rolesAndPermissions,
    callHistory,
    connectivityMonitor,
    rateLimiter,
    dateTimeFormat,
    call,
    composeText,
  },
  showContactDisplayPlaceholder = false,
  enableContactFallback = false,
}) {
  return {
    currentLocale: locale.currentLocale,
    activeRingCalls: callMonitor.activeRingCalls,
    activeOnHoldCalls: callMonitor.activeOnHoldCalls,
    activeCurrentCalls: callMonitor.activeCurrentCalls,
    otherDeviceCalls: callMonitor.otherDeviceCalls,
    areaCode: regionSettings.areaCode,
    countryCode: regionSettings.countryCode,
    outboundSmsPermission: !!(
      rolesAndPermissions.permissions &&
      rolesAndPermissions.permissions.OutboundSMS
    ),
    internalSmsPermission: !!(
      rolesAndPermissions.permissions &&
      rolesAndPermissions.permissions.InternalSMS
    ),
    // showSpinner: false,
    brand: brand.fullName,
    showContactDisplayPlaceholder,
    autoLog: !!(callLogger && callLogger.autoLog),
    enableContactFallback,
    calls: callHistory.latestCalls,
    disableLinks: !connectivityMonitor.connectivity ||
    rateLimiter.throttling,
    disableClickToDial: !(call && call.isIdle),
    loggingMap: (callLogger && callLogger.loggingMap),
    showSpinner: !(
      callHistory.ready &&
      locale.ready &&
      regionSettings.ready &&
      dateTimeFormat.ready &&
      connectivityMonitor.ready &&
      (!rolesAndPermissions || rolesAndPermissions.ready) &&
      (!call || call.ready) &&
      (!composeText || composeText.ready) &&
      (!callLogger || callLogger.ready)
    ),
    readTextPermission: rolesAndPermissions.readTextPermissions,
  };
}
91005
function newGroovyClosure(groovyClosureString) {
        // The groovy string must be a closure expression, e.g. '{ x -> println(x) }'.
        assert.ok(_isClosure(groovyClosureString));
        return new Tinkerpop.GroovyLambda(groovyClosureString, _groovyScriptEngine);
    }
391968
private void startupDialog(String prefs, int message, final Class clazz) {
        final SharedPreferences preferences = getSharedPreferences(prefs, Activity.MODE_PRIVATE);
        final String accepted = "accepted";
        if (!preferences.getBoolean(accepted, false)) {
            AlertDialog.Builder builder = new AlertDialog.Builder(Samples.this);
            builder.setTitle("Warning");
            builder.setMessage(message);
            builder.setPositiveButton(R.string.startup_dontshowagain, new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    preferences.edit().putBoolean(accepted, true).apply();
                    startActivity(new Intent(Samples.this, clazz));
                }
            });
            builder.show();
        } else {
            startActivity(new Intent(Samples.this, clazz));
        }
    }
1234364
@Override
    public void initialize(UimaContext context) throws ResourceInitializationException {

        super.initialize(context);

        this.context = context;

        this.logger = context.getLogger();

        if (this.logger.isLoggable(Level.INFO)) {
            this.logger.log(Level.INFO, "Initializing the OpenNLP " + "Part of Speech annotator.");
        }

        POSModel model;

        try {
            POSModelResource modelResource = (POSModelResource) context.getResourceObject(UimaUtil.MODEL_PARAMETER);

            model = modelResource.getModel();
        } catch (ResourceAccessException e) {
            throw new ResourceInitializationException(e);
        }

        Integer beamSize = AnnotatorUtil.getOptionalIntegerParameter(context, UimaUtil.BEAM_SIZE_PARAMETER);

        if (beamSize == null)
            beamSize = POSTaggerME.DEFAULT_BEAM_SIZE;

        this.posTagger = new POSTaggerME(model, beamSize, 0);
    }
1093577
private static HotSwapPassFactory createFeatureRemovalPass(
      String passName, final Feature featureToRemove, final Feature... moreFeaturesToRemove) {
    return new HotSwapPassFactory(passName) {
      @Override
      protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
        return new HotSwapCompilerPass() {
          @Override
          public void hotSwapScript(Node scriptRoot, Node originalRoot) {
            maybeMarkFeaturesAsTranspiledAway(compiler, featureToRemove, moreFeaturesToRemove);
          }

          @Override
          public void process(Node externs, Node root) {
            maybeMarkFeaturesAsTranspiledAway(compiler, featureToRemove, moreFeaturesToRemove);
          }
        };
      }

      @Override
      protected FeatureSet featureSet() {
        return FeatureSet.latest();
      }
    };
  }
994780
@Override @SuppressLint("NewApi")
    public void onCreate(Bundle savedInstanceState) {
        // Set window transition elements
        if(BuildUtils.isLollipop()) {
            getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);

            TransitionSet transitions = new TransitionSet()
                    .addTransition(new ChangeBounds())
                    .addTransition(new Fade());

            getWindow().setEnterTransition(new Explode());
            getWindow().setExitTransition(new Explode());
            getWindow().setSharedElementEnterTransition(transitions);
            getWindow().setSharedElementExitTransition(transitions);
        }

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_license);

        // Load UI
        mToolbar = ButterKnife.findById(this, R.id.appbar);
        mRecyler = ButterKnife.findById(this, R.id.recycler);

        // Set the toolbar as the support actionbar
        setSupportActionBar(mToolbar);
        parseExtras(savedInstanceState);

        // Set listeners
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        mToolbar.setNavigationOnClickListener(this);

        mRecyler.setAdapter(mAdapter);
        mRecyler.setLayoutManager(new LinearLayoutManager(this));
        mRecyler.setItemAnimator(new DefaultItemAnimator());
        mRecyler.addItemDecoration(new StickyRecyclerHeadersElevationDecoration(mAdapter));
        mAdapter.setOnItemClickListener(this);

    }
651568
public static TypeAnnotationPosition
        newObj(final List<TypePathEntry> location,
               final JCLambda onLambda,
               final int pos) {
        return new TypeAnnotationPosition(TargetType.NEW, pos,
                                          Integer.MIN_VALUE, onLambda,
                                          Integer.MIN_VALUE, Integer.MIN_VALUE,
                                          location);
    }