Workaround for https://issuetracker.google.com/67418335
554895
@Override
    @Input
    public String getCombinedInput() {
        return new CombinedInput(super.getCombinedInput())
                .add("dataBindingLayoutInfoOutFolder", null)
                .add("publicFile", getPublicFile())
                .add("blameLogFolder", getBlameLogFolder())
                .add(
                        "mergedNotCompiledResourcesOutputDirectory",
                        null)
                .toString();
    }
964127
public com.google.api.ads.adwords.axis.v201809.rm.PolicyViolationErrorPart[] getViolatingParts() {
        return violatingParts;
    }
439084
async function listenForErrors(subscriptionName, timeout) {
  // [START pubsub_subscriber_error_listener]
  // Imports the Google Cloud client library
  const {PubSub} = require('@google-cloud/pubsub');

  // Creates a client
  const pubsub = new PubSub();

  /**
   * TODO(developer): Uncomment the following lines to run the sample.
   */
  // const subscriptionName = 'my-sub';
  // const timeout = 60;

  // References an existing subscription
  const subscription = pubsub.subscription(subscriptionName);

  // Create an event handler to handle messages
  const messageHandler = function(message) {
    // Do something with the message
    console.log(`Message: ${message}`);

    // "Ack" (acknowledge receipt of) the message
    message.ack();
  };

  // Create an event handler to handle errors
  const errorHandler = function(error) {
    // Do something with the error
    console.error(`ERROR: ${error}`);
  };

  // Listen for new messages/errors until timeout is hit
  subscription.on(`message`, messageHandler);
  subscription.on(`error`, errorHandler);

  setTimeout(() => {
    subscription.removeListener(`message`, messageHandler);
    subscription.removeListener(`error`, errorHandler);
  }, timeout * 1000);
  // [END pubsub_subscriber_error_listener]
}
537939
static function submitBug($title, $content, $user='Anonymous', $component= "", $image = "", $bbAccount='rhildred', $status='new', $priority='major', $kind='bug'){
        $oCreds = json_decode(file_get_contents(__DIR__ . '/../../../../data/creds/bitbucket.json'));
        $basicAuth= $oCreds->basicAuth;
        $bbRepo = $bbAccount . "/" . $component;
        $url = "https://bitbucket.org/api/1.0/repositories/". $bbRepo . "/issues/";
;
        $ch = curl_init($url);

        if (get_magic_quotes_gpc()) {
            $title = stripslashes($title);
            $content = stripslashes($content);
            $user = stripslashes($user);
            $component = stripslashes($component);
            $bbAccount = stripslashes($bbAccount);
            $bbRepo = stripslashes($bbAccount) . "/" . stripslashes($component);
        }

        $fields = array(
                                'title' => urlencode($title),
                                'content' => urlencode($content."\n\nSubmitted By Userid: ". $user),
                                'status' => urlencode($status),
                                'priority' => urlencode($priority),
                                'kind' => urlencode($kind)
                        );
        // Build POST url:
        $fieldsStr = '';
        foreach($fields as $key=>$value) {
            $fieldsStr .= $key.'='.$value.'&';
        }
        $fieldsStr = rtrim($fieldsStr, '&');


        //$curl_log = fopen(dirname(__FILE__) . "/curl.txt", 'w+'); // open file for READ and write
        //curl_setopt($ch, CURLOPT_STDERR, $curl_log);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Basic '.$basicAuth)); //YXZpbnVzOmJpdHBhc3MxOQ==
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldsStr);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_VERBOSE, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

         $response = curl_exec($ch);
        curl_close($ch);

//        print_r($response);  // Debugging

        if( $response !== FALSE){
            $response = json_decode($response);
            if(isset($response->local_id) && intval($response->local_id) > 0 ){
                $bugurl = "https://bitbucket.org/". $bbRepo . "/issue/" . $response->local_id;
                return( array('issueid'=>$response->local_id, 'issueurl'=>$bugurl, 'result'=>'thank-you for your question') );
            }else{
                return(FALSE);
            }
        }else{
            return(FALSE);
        }

    }
188498
@Override
    public IssueResponse issue(String CorpNum, MgtKeyType KeyType, String MgtKey,
                          String Memo, String EmailSubject, boolean ForceIssue, String UserID)
            throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKey == null || MgtKey.isEmpty())
            throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

        IssueRequest request = new IssueRequest();
        request.memo = Memo;
        request.emailSubject = EmailSubject;
        request.forceIssue = ForceIssue;

        String PostData = toJsonString(request);

        return httppost("/Taxinvoice/" + KeyType.name() + "/" + MgtKey,
                CorpNum, PostData, UserID, "ISSUE", IssueResponse.class);
    }
1239136
def build_from_issues(gh_token, body):
    
    if body["action"] in ["opened", "edited"]:
        github_con = Github(gh_token)
        repo = github_con.get_repo(body['repository']['full_name'])
        issue = repo.get_issue(body['issue']['number'])
        text = body['issue']['body']
        comment = issue  # It's where we update the comment: in the issue itself
        return WebhookMetadata(repo, issue, text, comment)
    return None
403141
function () {
            return gpf.http.post("/fs/src/sources.json", this.toString())
                .then(function (answer) {
                    var HTTP_ERROR = 500;
                    if (answer.status === HTTP_ERROR) {
                        return dialogs.error(answer.responseText);
                    }
                });
        }
641440
function eventTargetPatch(_global, api) {
    var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';
    var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'
        .split(',');
    var EVENT_TARGET = 'EventTarget';
    var apis = [];
    var isWtf = _global['wtf'];
    var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');
    if (isWtf) {
        // Workaround for: https://github.com/google/tracing-framework/issues/555
        apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);
    }
    else if (_global[EVENT_TARGET]) {
        apis.push(EVENT_TARGET);
    }
    else {
        // Note: EventTarget is not available in all browsers,
        // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
        apis = NO_EVENT_TARGET;
    }
    var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;
    var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;
    var ieOrEdge = isIEOrEdge();
    var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';
    var FUNCTION_WRAPPER = '[object FunctionWrapper]';
    var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
    //  predefine all __zone_symbol__ + eventName + true/false string
    for (var i = 0; i < eventNames.length; i++) {
        var eventName = eventNames[i];
        var falseEventName = eventName + FALSE_STR;
        var trueEventName = eventName + TRUE_STR;
        var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
        var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
        zoneSymbolEventNames[eventName] = {};
        zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
        zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
    }
    //  predefine all task.source string
    for (var i = 0; i < WTF_ISSUE_555.length; i++) {
        var target = WTF_ISSUE_555_ARRAY[i];
        var targets = globalSources[target] = {};
        for (var j = 0; j < eventNames.length; j++) {
            var eventName = eventNames[j];
            targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;
        }
    }
    var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {
        if (!isDisableIECheck && ieOrEdge) {
            if (isEnableCrossContextCheck) {
                try {
                    var testString = delegate.toString();
                    if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
                        nativeDelegate.apply(target, args);
                        return false;
                    }
                }
                catch (error) {
                    nativeDelegate.apply(target, args);
                    return false;
                }
            }
            else {
                var testString = delegate.toString();
                if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
                    nativeDelegate.apply(target, args);
                    return false;
                }
            }
        }
        else if (isEnableCrossContextCheck) {
            try {
                delegate.toString();
            }
            catch (error) {
                nativeDelegate.apply(target, args);
                return false;
            }
        }
        return true;
    };
    var apiTypes = [];
    for (var i = 0; i < apis.length; i++) {
        var type = _global[apis[i]];
        apiTypes.push(type && type.prototype);
    }
    patchEventTarget(_global, apiTypes, { validateHandler: checkIEAndCrossContext });
    api.patchEventTarget = patchEventTarget;
    return true;
}
1131821
def format_issues(issues)
      results = [t('myissues.info')]
      results.concat(issues.map { |issue| format_issue(issue) })
    end
552366
def popError(text, title="Lackey Error"):
    
    root = tk.Tk()
    root.withdraw()
    tkMessageBox.showerror(title, text)
684213
def url_fix_common_typos (url):
    """"""
    if url.startswith("http//"):
        url = "http://" + url[6:]
    elif url.startswith("https//"):
        url = "https://" + url[7:]
    return url
239598
def errors(request, *args, **kwargs):
    
    search_term = request.GET.get('q', None)
    if '400' in search_term:
        return HttpResponseBadRequest(MESSAGE_400)
    elif '403' in search_term:
        return HttpResponseForbidden(MESSAGE_403)
    elif '404' in search_term:
        return HttpResponseNotFound(MESSAGE_404)
    elif '405' in search_term:
        return HttpResponseNotAllowed(['PATCH'], MESSAGE_405)
    return HttpResponseServerError(MESSAGE_500)
258412
def request_error!(exception)
      case exception
      when HTTP::Request::UnsupportedSchemeError, Addressable::URI::InvalidURIError
        raise Down::InvalidUrl, exception.message
      when HTTP::ConnectionError
        raise Down::ConnectionError, exception.message
      when HTTP::TimeoutError
        raise Down::TimeoutError, exception.message
      when HTTP::Redirector::TooManyRedirectsError
        raise Down::TooManyRedirects, exception.message
      when OpenSSL::SSL::SSLError
        raise Down::SSLError, exception.message
      else
        raise exception
      end
    end
31354
async function triageGoogleError(err, origin) {
    // console.log(err);
    const triaged = {
        err,
        origin,
        print: true,
    };

    if (err && err.code === 401) {
        triaged.message = `Your credentials appear to be invalid.\nRun 'gas auth -f' to re-authenticate.`;
        triaged.extraInfo = `Invalid Credentials`;
    } else if (err === `Error: invalid_grant`) {
        triaged.message = `Your credentials appear to be invalid.\nRun 'gas auth -f' to re-authenticate.`;
        triaged.extraInfo = `Invalid Grant`;
    } else if (err && err.code === 403) {
        triaged.message = err.message;
        triaged.extraInfo = `Not allowed`;
    } else if (err && err.code === 404) {
        triaged.message = err.message;
        triaged.extraInfo = `Not found`;
    } else if (err && err.code === `ENOTFOUND`) {
        triaged.message = `Can't seem to reach the Google servers.`;
        triaged.extraInfo = `No connection`;
    } else if (err && err.code === `ECONNRESET`) {
        triaged.message = `Unexpected closed connection.`;
        triaged.extraInfo = `Closed connection`;
    } else if (err && err.code === 400 && origin === 'pushToRemote') {
        const projectRoot = await findInProject('.', constants.META_DIR);
        if (projectRoot.found) {

            // Find syntax errors in all files
            const files = getAllFiles(projectRoot.folder, '.', []);
            const syntaxErrors = [];
            for (const file of files) {
                const extension = path.parse(file).ext;
                if (extension === '.js' || extension === '.gs') {
                    const src = fs.readFileSync(path.join(projectRoot.folder, file));
                    const syntaxErr = check(src, file);
                    if (syntaxErr) {
                        syntaxErrors.push(syntaxErr);
                    }
                }
            }

            // Create a message with a summary of found syntax errors
            if (syntaxErrors.length > 0) {
                let message = `The code you are trying to push appears to have 1 or more syntax error(s).`;
                for (const err of syntaxErrors) {
                    message += `-------------------------------------------------------------------------------------------------\n`;
                    message += `${err}\n`;
                }
                triaged.extraInfo = `${syntaxErrors}`;
            } else {
                triaged.message = `Google doesn't accept the code you are trying to push. Try doublechecking for project structure errors.`;
                triaged.extraInfo = `No syntax errors`;
            }
        } else {
            triaged.message = `Google doesn't accept the code you are trying to push. Try doublechecking for project structure errors.`;
            triaged.extraInfo = `No .gas folder found`;
        }
    } else if (err) {
        triaged.message = (`gas returned an error: ${err}`);
        triaged.extraInfo = `Not a known error`;
    } else {
        triaged.message = (`O-oh. Something seems to have gone wrong.`);
        triaged.extraInfo = `No error passed to the function`;
    }
    return triaged;
}
827835
def get_issue_remotelinks(self, issue_key, global_id=None, internal_id=None):
        
        return self.get_issue_remote_links(issue_key, global_id, internal_id)
14544
def _policyFileReplaceOrAppend(this_string, policy_data, append_only=False):
    '''
    
    '''
    # we are going to clean off the special pre-fixes, so we get only the valuename
    if not policy_data:
        policy_data = b''
    specialValueRegex = salt.utils.stringutils.to_bytes(r'(\*\*Del\.|\*\*DelVals\.){0,1}')
    item_key = None
    item_value_name = None
    data_to_replace = None
    if not append_only:
        item_key = this_string.split(b'\00;')[0].lstrip(b'[')
        item_value_name = re.sub(specialValueRegex,
                                 b'',
                                 this_string.split(b'\00;')[1],
                                 flags=re.IGNORECASE)
        log.debug('item value name is %s', item_value_name)
        data_to_replace = _regexSearchKeyValueCombo(policy_data, item_key, item_value_name)
    if data_to_replace:
        log.debug('replacing %s with %s', data_to_replace, this_string)
        policy_data = policy_data.replace(data_to_replace, this_string)
    else:
        log.debug('appending %s', this_string)
        policy_data = b''.join([policy_data, this_string])

    return policy_data
580518
def issue(self, invoice_id, **kwargs):
        "
        url = "{}/{}/issue".format(self.base_url, invoice_id)
        return self.post_url(url, {}, **kwargs)