Program: 163091
Project: 163091
Buggy source:
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
  findAndHookConstructor(DefaultHttpClient.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      setObjectField(param.thisObject,"String_Node_Str",null);
      setObjectField(param.thisObject,"String_Node_Str",getSCCM());
    }
  }
);
  findAndHookConstructor(DefaultHttpClient.class,HttpParams.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      setObjectField(param.thisObject,"String_Node_Str",(HttpParams)param.args[0]);
      setObjectField(param.thisObject,"String_Node_Str",getSCCM());
    }
  }
);
  findAndHookConstructor(DefaultHttpClient.class,ClientConnectionManager.class,HttpParams.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      HttpParams params=(HttpParams)param.args[1];
      setObjectField(param.thisObject,"String_Node_Str",params);
      setObjectField(param.thisObject,"String_Node_Str",getCCM(param.args[0],params));
    }
  }
);
  findAndHookConstructor(SSLSocketFactory.class,String.class,KeyStore.class,String.class,KeyStore.class,SecureRandom.class,HostNameResolver.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      String algorithm=(String)param.args[0];
      KeyStore keystore=(KeyStore)param.args[1];
      String keystorePassword=(String)param.args[2];
      SecureRandom random=(SecureRandom)param.args[4];
      KeyManager[] keymanagers=null;
      TrustManager[] trustmanagers=null;
      if (keystore != null) {
        keymanagers=(KeyManager[])callStaticMethod(SSLSocketFactory.class,"String_Node_Str",keystore,keystorePassword);
      }
      trustmanagers=new TrustManager[]{new ImSureItsLegitTrustManager()};
      setObjectField(param.thisObject,"String_Node_Str",SSLContext.getInstance(algorithm));
      callMethod(getObjectField(param.thisObject,"String_Node_Str"),"String_Node_Str",keymanagers,trustmanagers,random);
      setObjectField(param.thisObject,"String_Node_Str",callMethod(getObjectField(param.thisObject,"String_Node_Str"),"String_Node_Str"));
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return (SSLSocketFactory)newInstance(SSLSocketFactory.class);
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",Socket.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return true;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      Class<?> cls=findClass("String_Node_Str",lpparam.classLoader);
      TrustManager[] managers=(TrustManager[])param.getResult();
      if (managers.length > 0 && cls.isInstance(managers[0]))       return;
      param.setResult(new TrustManager[]{new ImSureItsLegitTrustManager()});
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",HostnameVerifier.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",javax.net.ssl.SSLSocketFactory.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",HostnameVerifier.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",WebView.class,SslErrorHandler.class,SslError.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      ((android.webkit.SslErrorHandler)param.args[1]).proceed();
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",WebView.class,int.class,String.class,String.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",X509Certificate[].class,String.class,String.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      ArrayList<X509Certificate> list=new ArrayList<X509Certificate>();
      return list;
    }
  }
);
}

Fixed version (ground truth):
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
  findAndHookConstructor(DefaultHttpClient.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      setObjectField(param.thisObject,"String_Node_Str",null);
      setObjectField(param.thisObject,"String_Node_Str",getSCCM());
    }
  }
);
  findAndHookConstructor(DefaultHttpClient.class,HttpParams.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      setObjectField(param.thisObject,"String_Node_Str",(HttpParams)param.args[0]);
      setObjectField(param.thisObject,"String_Node_Str",getSCCM());
    }
  }
);
  findAndHookConstructor(DefaultHttpClient.class,ClientConnectionManager.class,HttpParams.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      HttpParams params=(HttpParams)param.args[1];
      setObjectField(param.thisObject,"String_Node_Str",params);
      setObjectField(param.thisObject,"String_Node_Str",getCCM(param.args[0],params));
    }
  }
);
  findAndHookConstructor(SSLSocketFactory.class,String.class,KeyStore.class,String.class,KeyStore.class,SecureRandom.class,HostNameResolver.class,new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      String algorithm=(String)param.args[0];
      KeyStore keystore=(KeyStore)param.args[1];
      String keystorePassword=(String)param.args[2];
      SecureRandom random=(SecureRandom)param.args[4];
      KeyManager[] keymanagers=null;
      TrustManager[] trustmanagers=null;
      if (keystore != null) {
        keymanagers=(KeyManager[])callStaticMethod(SSLSocketFactory.class,"String_Node_Str",keystore,keystorePassword);
      }
      trustmanagers=new TrustManager[]{new ImSureItsLegitTrustManager()};
      setObjectField(param.thisObject,"String_Node_Str",SSLContext.getInstance(algorithm));
      callMethod(getObjectField(param.thisObject,"String_Node_Str"),"String_Node_Str",keymanagers,trustmanagers,random);
      setObjectField(param.thisObject,"String_Node_Str",callMethod(getObjectField(param.thisObject,"String_Node_Str"),"String_Node_Str"));
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return (SSLSocketFactory)newInstance(SSLSocketFactory.class);
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",Socket.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return true;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",new XC_MethodHook(){
    @Override protected void afterHookedMethod(    MethodHookParam param) throws Throwable {
      Class<?> cls=findClass("String_Node_Str",lpparam.classLoader);
      TrustManager[] managers=(TrustManager[])param.getResult();
      if (managers.length > 0 && cls.isInstance(managers[0]))       return;
      param.setResult(new TrustManager[]{new ImSureItsLegitTrustManager()});
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",HostnameVerifier.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",javax.net.ssl.SSLSocketFactory.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",HostnameVerifier.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",WebView.class,SslErrorHandler.class,SslError.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      ((android.webkit.SslErrorHandler)param.args[1]).proceed();
      return null;
    }
  }
);
  findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",WebView.class,int.class,String.class,String.class,new XC_MethodReplacement(){
    @Override protected Object replaceHookedMethod(    MethodHookParam param) throws Throwable {
      return null;
    }
  }
);
  if (hasTrustManagerImpl()) {
    findAndHookMethod("String_Node_Str",lpparam.classLoader,"String_Node_Str",X509Certificate[].class,String.class,String.class,new XC_MethodReplacement(){
      @Override protected Object replaceHookedMethod(      MethodHookParam param) throws Throwable {
        ArrayList<X509Certificate> list=new ArrayList<X509Certificate>();
        return list;
      }
    }
);
  }
}